We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19889
    • 616 Posts
    I was wondering whether anybody is successfully using the wf.attributes parameter in order to e.g. set rel="external" - I can’t get it to work at all.

    Thank you in advance for your input.
      • 10449
      • 956 Posts
      Works fine here. How do you use it? You have to insert [+wf.attributes+] in your corresponding template chunk.

      e.g.
      <li[+wf.id+][+wf.classes+]><a href="[+wf.link+]" title="[+wf.title+]" [+wf.attributes+]>[+wf.linktext+]</a>[+wf.wrapper+]</li>
      


      It picks up whatever you put in the document "attribute" field (both "normal" + weblink docs).
        • 19889
        • 616 Posts
        Quote from: ganeshXL at Dec 17, 2007, 12:56 PM

        Works fine here. How do you use it? You have to insert [+wf.attributes+] in your corresponding template chunk.

        e.g.
        <li[+wf.id+][+wf.classes+]><a href="[+wf.link+]" title="[+wf.title+]" [+wf.attributes+]>[+wf.linktext+]</a>[+wf.wrapper+]</li>
        


        It picks up whatever you put in the document "attribute" field (both "normal" + weblink docs).

        Thanks for replying - well, I just don’t see how to use this - where would I set "target=’_blank’ rel="external"" - I’m using a config file for the navigation and I really don’t see where I’ve set this.

        I guess I could do just something like this:

        $rowTpl = ’@CODE:
        <li[+wf.classes+]>
        <a href="[+wf.link+]" target="_blank" rel="external" title="[+wf.title+]">[+wf.linktext+]</a>
        [+wf.wrapper+]
        </li>’;

        but I still don’t see then how to use wf.attributes?

          • 10449
          • 956 Posts
          OK, let’s do this again. I think you don’t see the forest anymore because of all the trees, because it’s really simple and straightforward.

          a) Enter any kind of attribute in the "link attributes" field of your MODx documents. That’s the field just below "alias".
          rel="nofollow"
          or
          target="_blank"
          or both: rel="nofollow" target="_blank"


          b) Make sure that whatever WF template you use, includes the [+wf.attributes+] placeholder.
          (see my 1st post)

          The list of template names is here:
          http://wiki.modxcms.com/index.php/Wayfinder

          If you still have the example site in your MODx install, you’d change the following template chunks:
          mh.InnerRowTpl + mh.RowTpl

          As simple as that :]