We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32777
    • 2 Posts
    Hi to everyone!

    I’m trying to use Wayfinder (version 2.1.1.beta1) together with custom defined template variables (MODx Revolution 2.0.0-beta-3). My goal is being able to use TV to specify images to be used in the templates.

    I have specified the TV as follows:

    [[+rimage]]

    but the output is empty.

    I have even tried to reference a TV of type text (fearing that image/file were not supported), but the result is the same.

    Can somebody help me out?

    Daniel
      • 3440
      • 17 Posts
      Hello,

      I’m facing the same problem.
      Using Revolution 2.0.0-beta-3 and Wayfinder 2.1.1.beta1 I cannot find a way to use TV’s values referenced in a row template:

      <li [[+wf.id]] [[+wf.classes]] style="background-color:[[+menu_color]];">
      	<a href="[[+wf.link]]" title="[[+wf.title]]" [[+wf.attributes]]>[[+wf.linktext]]</a>
      	[[+wf.wrapper]]
      </li>
      


      Using this syntax [[+menu_color]] gets substituted in every row occurrence by the same value (i.e. the current displayed page TV (menu_color) value) which is of course not the expected behavior.

      As a substitute solution I’m using the &rowIdPrefix / [[+wf.id]] option with css definitions to achieve a similar result but this is lacking the power and flexibility available when using TV values.

      To my opinion, accessing TV values from within Wayfinder row templates is one of it’s most useful and powerful option. Could someone (Kyle ?) tell us if there are plans for adding this to a Revolution compatible version of Wayfinder anytime soon. Or am I missing something and there is a way to get this functionnality working ?

      Thank you for paying attention to this remark.

      Best.
        • 3749
        • 24,544 Posts
        Try this to make the TV uncached:

        [[!+menu_color]]
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 20473
          • 15 Posts
          Hi

          Is there a solution to this issue yet? I am trying to display a TV image in my Wayfinder menu for a revolution 2.0.0 b5 site but nothing is appearing using any of the formats I have tried ([[+rollupimage]], [[!+rollupimage]], [+rollupimage+]).
          [[*rollupimage]] brings back the image but of course it is the image associated with the current page, not per menu item.

          Thanks
          Mark

            • 567
            • 8 Posts
            I have been intending to post this later, in my own topic, but perhaps I can post some here unpolished.

            Right now, I do have something working that appears to be approximately what you are speaking of...

            Unfortunately, I’m not really sure what all will be usefull so I’m going to pretty much post it all smiley.

            Right now this is something under development so alot of the names are not what I will end up w/. somewhat modified from a cssplay flyout example found.

            This is in my modX template, (call to menu)
            <div id="menubar">
            {{menuBarText}}
            </div>


            This is from chunk ’menuBarText’
            <ul id="verticalNav">
            <li>
            [[Wayfinder? &startId=`0` &level=`3` &parentRowTpl=`main_cssplay_parentRow` &excludeDocs=54,55,56 &outerTpl=`main_cssplay_outer` &innerTpl=`main_cssplay_inner` &rowTpl=`main_cssplay_row` &outerClass=`toplevel` &cssTpl=`flyout` &lastClass=&hereClass=&levelClass=lvl]]
            </li>
            </ul>


            This is from chunk ’main_cssplay_parentRow’
            <li [+wf.classes+]><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>
                    <ul class="sub">
                    [+wf.wrapper+]        </ul>
                    </li>


            This is from chunk ’main_cssplay_outer’
                <ul class="toplevel">
                    [+wf.wrapper+]    </ul>


            This is from chunk ’main_cssplay_inner’
                            [+wf.wrapper+] 


            This is from chunk ’main_cssplay_row’
            <li[+wf.classes+]><a class="sub2" href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>[+TEST+]


            (Above, you can see the wayfinder callout to the template variable [+TEST+].)
            This template variable TEST is linked to my modX template, but not used in the normal page, only grabbed by the wayfinder menu as needed (if present), on my site, this is in the ’3rd child pages’ of the site


            This is from chunk ’flyout’
            <link rel="stylesheet" media="all" type="text/css" href="assets/templates/newUMD/flyout2.css" />


            This is flyout2.css
            /* ================================================================ 
            This copyright notice must be untouched at all times.
            
            The original version of this stylesheet and the associated (x)html
            is available at http://www.cssplay.co.uk/menus/vertical-list.html
            Copyright (c) 2005-2009 Stu Nicholls. All rights reserved.
            This stylesheet and the associated (x)html may be modified in any 
            way to fit your requirements.
            =================================================================== */
            
            #menuContainer {width:750px; height:500px; background:url(vertical-list/fashion.jpg); position:relative;}
            
            #verticalNav {
               position:absolute;
               left:222px;
               top:130px;
               margin:0;
               list-style:none;
               font-family:verdana, sans-serif;
               float:left;
               padding:0 0 0 0;
            }
            
            #verticalNav ul.toplevel {
               width:153px;
               padding:0;
               margin:0px 0 0 0;
               list-style:none;
            }
            
            #verticalNav ul.sub{
               padding:0;
               list-style:none;
            }
            #verticalNav table {
               border-collapse:collapse;
               margin:-1px;
            }
            
            #verticalNav ul.toplevel ul.sub {
               display:none;
               left:-9999px;
               width:173px;
            }
            
            #verticalNav li.lvl3 {
              left:-9999px;
              display:none;
            }
            
            #veerticalNav ul.toplevel li {
            float:left;
            width:153px;
            }
            
            #verticalNav ul.toplevel li a {
            display:block;
            width:146px;
            padding-left:11px;
            height:22px;
            line-height:22px;
            text-decoration:none;
            color:#000;
            font-size:9px;
            background:#eef011 url(/assets/images/ltrgrey.gif) repeat 157px center;
            //border:1px solid #ddd;
            //border-width:1px 1px 1px 1px;
            border:none;
            }
            
            #verticalNav li.lvl3 {
               position:absolute;
               display:none;
            }
            
            #verticalNav li.lvl2 {  // testing purposes....
               //position:absolute;
               margin:0px 0px 0px -61px; // left spacing
            }
            #verticalNav li.lvl1 {
               position: relative;
               margin:0px 0px 0px 0px;
               padding:0px 0px 2px 11px;
            }
            
            #veerticalNav a:hover {
            white-space:nowrap;
            }
            
            #verticalNav ul.toplevel li a:hover {
            color:#069;
            filter:alpha(opacity=80);
            opacity:.8;
            background:#EEE url(/assets/images/ltrlightgrey.gif) repeat 157px center;
            }
            
            #veerticalNav ul.toplevel li:hover > a {
            color:#069;
            filter:alpha(opacity=100);
            opacity:1.0;
            }
            
            #verticalNav :hover ul.toplevel :hover ul.sub {
            position:absolute;
            display:inline;
            top:0px;
            left:214px;
            }
            
            #verticalNav :hover li.lvl2 {
            }
            
            #verticalNav :hover li.lvl2 a {
            }
            
            #verticalNav :hover li.lvl3 {
            }
            
            #verticalNav :hover ul.toplevel :hover ul.sub li a {
            background:#eee;
            background:#000;
            color:#FFF;
            filter:alpha(opacity=75);
            opacity:75;
            }
            
            #verticalNav :hover ul.toplevel :hover ul.sub li a:hover {
            background:#fff;
            color:#069;
            filter:alpha(opacity=90);
            opacity:90;
            }
            
            #verticalNav ul.toplevel ul div.base {
               margin:0px 0px 0px -150px;
               position:absolute;
               left:-9999px;
               background:#fff;
               border:1px solid #ddd;
               padding:0px;
               width:340px;
               height:310px;
            }
            
            #verticalNav ul.toplevel ul div.border {
               margin:0px 0px 0px -150px;
               position:absolute;
               left:-9999px;
               background:#515151;
               filter: alpha(opacity=60);
               width:362px;
               height:333px;
            }
            
            #verticalNav :hover ul.toplevel :hover ul.sub :hover div.base {
            top: 15px;
            left:-480px;
            z-index:2;
            }
            
            #verticalNav :hover ul.toplevel :hover ul.sub :hover div.border {
            left:-490px;
            top:5px;
            z-index:2;
            }
            
            #verticalNav :hover ul.toplevel :hover ul.sub :hover div.base ul {
            float:left;
            padding:0;
            margin:0;
            list-style:none;
            width:200px;
            }
            
            #verticalNav :hover ul.toplevel :hover ul.sub :hover div.base ul li {
            display:inline;
            float:left;
            width:150px;
            height:auto;
            padding:0;
            margin:0;
            }
            
            #verticalNav :hover ul.toplevel :hover ul.sub :hover div.base ul li a {
            width:190px;
            padding-left:10px; 
            background:#fff url(vertical-list/dot.gif) no-repeat left center;
            color:#000;
            border:0;
            margin:0;
            height:auto;
            line-height:18px;
            }
            
            #verticalNav :hover ul.toplevel :hover ul.sub :hover div.base ul li a:hover {
            color:#069;
            }
            
            #verticalNav :hover ul.toplevel :hover ul.sub :hover div.base h4 {
            color:#888;
            font-size:13px;
            margin:0;
            padding:5px 0 5px 0;
            }
            
            #verticalNav :hover ul.toplevel :hover ul.sub :hover div.base p {
               color:#555;
               font-size:11px;
               margin:0;
               padding:0 0 5px 0;
               line-height:18px;
            }
            
            



            and finally,

            this is the HTML that I put into the ’test’ rich text template variable (on the pages, I wish it to show up)
            <div class="border b2"> </div>
            <div class="base div">
            <h4><img src="assets/images/wm3.jpg" alt="" width="220" height="178" /></h4>
            <h4>World Wide Innovator</h4>
            <p>We provide blur task.
            </p>
            <ul>
            <li><a href="#url">blur Systems</a></li>
            <li><a href="#url">blur</a></li>
            <li><a href="#url">blur Systems</a></li>
            </ul>
            </div>



            I hope this can be of any use to you... gluck.
              • 18608
              • 112 Posts
              Quote from: mrtrombone at Dec 17, 2009, 04:38 AM

              Hi

              Is there a solution to this issue yet? I am trying to display a TV image in my Wayfinder menu for a revolution 2.0.0 b5 site but nothing is appearing using any of the formats I have tried ([[+rollupimage]], [[!+rollupimage]], [+rollupimage+]).
              [[*rollupimage]] brings back the image but of course it is the image associated with the current page, not per menu item.

              Thanks
              Mark



              I’m stuck with the same problem as above - any ideas?

              /Mathias
                Mathias Dannevang | Webdesigner at dannevang.org | Tweets @dannevang
                • 3749
                • 24,544 Posts
                The first thing to try would be upgrading MODx to 2.0.4 and then seeing if there is a new version of Wayfinder for that version.

                The tag would definitely be:

                [[+rollupimage]]


                or

                [[!+rollupimage]]
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org