-
- 406 Posts
I Hope I am posting to the correct forum.
have a ’content’ template which handles all my pages.
I’d like to vary its content according to whether someone has clicked a link from the home page, which has a resource ID #1.
That is, if the Resource ID == 1, use a particular chunk which contains particular placeholders.
Otherwise display a different chunk with different placeholders.
It would be something like:
[[!*id:if=`[[*id]]`:eq=`1`:then=`[[$foo]]`:else=`[[$bar]]`]]
*id is for the current page, I need whatever is the way to designate the previous page’s ID to know if it was 1 or not...it’s the only source for going to the particular resource IDs involved...
Would it be [[*parent]]?? Does this pre-defined TV exist?? I need to use the parent ID of the current ID to know what to do with this call.
It seems like
[[!*parent:if=`[[*parent]]`:eq=`1`:then=`[[$foo]]`:else=`[[$bar]]`]] would work??????
This is for an announcements section, where each announcement section goes to its own announcement, whose parent ID is 1 (home).
Thank you, Tom
-
- 659 Posts
Hi Tom,
[[*parent]] does exist, it treturns the ID of the imediate parent. So your [[!*parent:if=`[[*parent]]`:eq=`1`:then=`[[$foo]]`:else=`[[$bar]]`]] should work...
you can also do
[[!*parent:is=`1`:then=`[[$foo]]`:else=`[[$bar]]` ]]
Cheers
-
- 225 Posts
hi,
i search a documentation for all small function same : `is` or `if` etc...
do you know where can i find these pages ?