I try to understand better Stash Bundles, so I tried to use Stash code to save a group of variables as a single variable in a defined bundle.
The variables:
{exp:stash:set_value name="un" bundle="default"}
{exp:stash:set_value name="deux" bundle="default"}
{exp:stash:set_value name="trois" bundle="default"}
The group of the variables inside a defined bundle:
{exp:stash:bundle name="bundle"}
{exp:stash:get name="un"}
{exp:stash:get name="deux"}
{exp:stash:get name="trois"}
{/exp:stash:bundle}
Call the defined bundle
{exp:stash:get name="bundle"}
Results (in the html page):
a:3:{s:2:"un";N;s:4:"deux";N;s:5:"trois";N;}
Why the variables appears like this, and not display:
un
deux
trois
What it means a:3:{s:2: ;N; ? I'm totally lost. How to display only un deux trois?
Thanks.
Additional information.
I tried with:
{exp:stash:bundle name="segments"}
{exp:stash:get name="{segment_1}"}
{exp:stash:get name="{segment_2}"}
{/exp:stash:bundle}
<h1>{exp:stash:get name="segments"}</h1>
Results:
a:2:{s:5:"stash";N;s:7:"bundles";N;}
So a is the number of variables into a bundle, S: the number of characters of each variables. What is N ? I do not understand this output format, it seems as JSON. What can I do with this output:
a:2:{s:5:"stash";N;s:7:"bundles";N;} ?
How to use it, and only extract stash, bundles data, coming from {segment_x} ?