I have a situation where I have a small block of content (an image, headline, and short piece of text) that needs to be part of a pulldown menu for my top-level menu categories. (The categories are things like Products, Company, News, etc).
To accomplish this, I was thinking of doing something like the following:
[[!Wayfinder? &startId=`0` &level=`1` &excludeDocs=`7` &rowTpl=`rn_category_item_tpl` &outerTpl=`rn_category_outer_tpl`]]
and within the rn_category_item_tpl rowTpl, putting out something like the following:
<div ...>
[[!getImageList? &tvname=`rn` &tpl=`rn_box_tpl` &where=`{"rn_name":"[[+wf.pagetitle]]"}` &docid=`1` &limit=`1`]]
[[!Wayfinder? &startId=`???` &level=`1` &rowTpl=`rn_item_tpl` &outerTpl=`rn_outer_tpl`]]
</div>
In my MigX, I have an "rn_name" tv that is basically the name of the top-level menu category (eg. "Products"); I'm fairly confident that this will work fine.
Where I'm having a bit of trouble is how to set the startId of the Wayfinder call to generate the sub-menu for that category. All I want is the id of the resource whose title matches the category context of the current Wayfinder iteration.
Would using something like the following provide me with the one id I'm looking for?
[[!getResources? &where=`{"pagetitle:=":"[[+wf.pagetitle]]"}`]]
Also, is this general approach reasonable, or is there an easier mechanism that I've overlooked?
Hopefully this description makes sense; any info/suggestions greatly appreciated...