We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47562
    • 113 Posts
    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...
      • 4172
      • 5,888 Posts
      doesn't

      [[!Wayfinder? &startId=`[[+wf.id]]` &level=`1` &rowTpl=`rn_item_tpl` &outerTpl=`rn_outer_tpl`]]


      work?

      Also, I would call everything cached!

      [[Wayfinder? &startId=`0` &level=`1` &excludeDocs=`7` &rowTpl=`rn_category_item_tpl` &outerTpl=`rn_category_outer_tpl`]]
      


      <div ...>
      [[getImageList? &tvname=`rn` &tpl=`rn_box_tpl` &where=`{"rn_name":"[[+wf.pagetitle]]"}` &docid=`1` &limit=`1`]]
      [[Wayfinder? &startId=`[[+wf.id]]` &level=`1` &rowTpl=`rn_item_tpl` &outerTpl=`rn_outer_tpl`]]
      </div>




        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 47562
        • 113 Posts
        Hey Bruno.

        Ah, yes, I knew I'd been staring at this for too long; wf.id is exactly what I need. (And yes, I'll definitely leave caching on...).

        Thanks very much. smiley