Hi,
I have a getResources call which has a couple of Weblinks in the output. The client wants those to oppen in a new browser window. I added [[+link_attributes]] to my tpl as below:
<li>
<a href="[[~[[+id]]]]" [[+link_attributes]] title="[[+pagetitle]]">
<p>[[+pagetitle]]</p>
</a>
</li>
and in the link attributes field on the resource, I have target="_blank"
But it's not working - any ideas? I've used this with wayfinder before, but thought it should work with getResources too?
Thanks
Andy
-
☆ A M B ☆
- 24,524 Posts
Try the pdoTools package, and its pdoResources snippet. I haven't used getResources for years.
<li><a href="[[~[[+id]]]]" [[+link_attributes]]>[[+menutitle]]</a></li>
-
☆ A M B ☆
- 1,780 Posts
To replace Wayfinder, use pdoMenu. It comes with pdoTools. A few things are different though. See the documentation. The one thing I have noted as not working the same is the &textOfLinks parameter. I've had to use a placeholder such as [[+menutitle]] or [[+pagetitle]] in the tpl instead of [[+wf.linktext]] if I want it to show anything but the pagetitle.