Hello
I’d like to randomly show e.g. 5 weblinks that I collect in a container.
while wayfinder works fine in general, I don’t see how I could limit the output to 5 links and show them randomly - that’s why I tuned to ditto.
got it to work just fine, however ditto seems to ignore the "Link Attributes" like rel="external" and also shows the link to the internal page rather than the link to the external page.
Am I missing something here or how could this be done?
Thank you in advance for your input.
You need to check which placeholder is used for Link Attributes. Not sure how u can but try [+linkattributes+]
For the external link you need to use [+content+] instead of [+link+] or [~[+id+]~]
Hope this helps.
using content worked in order to get the real url - however, it looks that there is no +linkattribute+ placeholder - I was browsing through the ditto class but I couldn’t see anything about setting a linkattribute placeholder.
anybody got an idea how to get the linkattributes of the weblinks to ditto - sorry for bumping but my clients is looking forward to get his website.
Try [+link_attributes+] It should work.
You are right, its not in the docs and even not in the modx docs. Since its rarely used element or mostly used with Wayfinder and Wayfinder has dedicated placeholder for it so its been overlooked.
I’ll make sure it goes into modx document variables list.