We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14254
    • 35 Posts
    Hi all,

    I seem to have a problem with the "link attributes" section of the "Weblink" containers on my site.

    When I create a new Weblink container, my client wants certain links to open in new windows. I know this isn’t exactly a good idea for a lot of reasons, but hey, this is what the client wants.

    So, I create the weblink object and in the "link attributes" section I insert the target="_blank" attribute. I save the changes and nothing happens. The link doesn’t open in a new window. I’ve also tried the rel="external" attribute.

    I’m using Wayfinder to generate the menu and when I look at the source of the page, the attribute itself isn’t there. Nothing. Just the main link code.

    I’ve searched the forum archive and found some posts on this, but no resolutions. Is this a Wayfinder issue? Is there a fix/workaround?

    I could put the attribute in the snippet code, but then this would apply to all the links. I just need it to apply to certain ones, and the "Link attributes" section of the weblink page seemed link the natural place for this.

    Any help on this would be really appreciated. I can provide sames of the code or screen shots if it would help.

    Thanks in advance.

    Justin
      • 7231
      • 4,205 Posts
      I think that you need to add the placeholder in the tpl:
      [+wf.attributes+] - where to insert link attributes


      Here is an example:
      <li[+wf.id+][+wf.classes+]>
      	<a href="[+wf.link+]" title="[+wf.title+]" [+wf.attributes+]>[+wf.linktext+]</a>
      	[+wf.wrapper+]
      </li>

        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don&#39;t know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 14254
        • 35 Posts
        BINGO!!!!

        Thank you so much. I hadn’t even thought about needing to put the attribute tag in the snippets.

        Thanks again for your help. Much appreciated.

        Justin