Extension, Module

Archived
Forum
(read-only)

Stash

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5, ExpressionEngine 6

Back to this add-on's main page
View Other Add-ons From Mark Croxton

     

doubts about Stash Bundle

Support Request

stefanos
stefanos

Hi Mark,

I have doubts about Bundles,

The URL:

http://site/stash/bundles



{exp:stash:bundle name=“segments”}
        {exp:stash:get name=”{segment_1}”}
        {exp:stash:get name=”{segment_2}”}
{/exp:stash:bundle}


{exp:stash:get name=“segments”}

 

The result page display:

a:2:{s:5:“stash”;N;s:7:“bundles”;N;}

I know it’s a serialized array, but how can I extract the data inside, like stash and bundles variables, coming from {segment_x} ?

I tried with get_list, but without success.

 

My wish is to have on the page result:

stash
bundles

regards,

Stéphane

Mark Croxton
# 1
Developer
Mark Croxton

Hi Stéphane

the bundle tag can be used to persist a group of GET or POSTed values, but please be very careful to use match=”” to ensure the values of your variables match an expected pattern. If you do not your template will be vulnerable to injection.

Please see:
https://github.com/croxton/Stash/wiki/{exp:stash:bundle}

Unless you are working with forms I’m not sure why you need to use this functionality. Perhaps if you described what you are trying to achieve I can suggest another way to do it?

 

stefanos
# 2
stefanos

Hi Mark!

Thank you a lot for your fast and efficient reply. Now I understand better the use of bundle. My objetive is to understand and domine strongly your wonderfull Stash add-on.

I have a lot of respect for you and for your work.

Thanks again, now bundle is more clear for me ☺
In the beggining I did not realize bundle was for get and post.

I guess I can achieve my wish using get list. I am doing “experiences” to learn and domine better Stash.

Regards,

Stéphane