-
☆ A M B ☆
- 3,141 Posts
Try checking out the switch snippet, should do what you need.
-
☆ A M B ☆
- 275 Posts
really helped.
[[!switch?&get=`[[*context_key]]`&c1=`web`&do1=`22`&c2=`ned`&do2=`21`&c3=`rus`&do3=`20`&c4=`est`&do4=`19`&default=`22`]]
[[!switch?&get=`[[*context_key]]`&c1=`web`&do1=`web`&c2=`ned`&do2=`ned`&c3=`rus`&do3=`rus`&c4=`est`&do4=`est`&default=`web`]]
I use this in get resources
<ul>
[[getResources:default=``?
&parents=`[[!switch?&get=`[[*context_key]]`&c1=`web`&do1=`22`&c2=`ned`&do2=`21`&c3=`rus`&do3=`20`&c4=`est`&do4=`19`&default=`22`]]`
&tpl=`tpl.Lst`
&depth=`2`
&hideContainers=`1`
&context=`[[!switch?&get=`[[*context_key]]`&c1=`web`&do1=`web`&c2=`ned`&do2=`ned`&c3=`rus`&do3=`rus`&c4=`est`&do4=`est`&default=`web`]]`
]]
</ul>
to make getR. understand which folder & context to retrieve the resources from ;-)
modx and ecommerce pro
-
☆ A M B ☆
- 3,141 Posts
Shouldn’t hurt caching that switch statement - context_key wont change until the cache gets refreshed.
-
☆ A M B ☆
- 275 Posts
hm...
I will test but
[[!Wayfinder?
&startId=`0`
&level=`2`
&hereClass=``
]]
works well without this
modx and ecommerce pro
-
☆ A M B ☆
- 3,141 Posts
Not saying it wont work - but when you remove the exclamation mark the result will be cached along with the resource, and it wont have to process that on every request.
Unless you have items in your menu that change depending on if a user is logged in or not, you can get a performance boost with caching wayfinder too!
-
☆ A M B ☆
- 275 Posts
Thanks a lot, removing uncached from Wayfinder but seems I must leave uncached call of GR snipet.
modx and ecommerce pro