So in essence MODX doesn't distinguish between Document, Weblink and Symlink? I find it rather strange that Weblink and Symlink don't have tags to manipulate, like [[*weblink]]
EDIT: The Weblink tag is actually [[+content]]
I created a TV called resType so I can have a `hook` so to speak. Then I created a simple conditional:
[[+resType:is=`Weblink`:then=`[[!getResources@Weblink?parents=`[[*id]]`]]`:else=`[[!getResources@Regular?parents=`[[*id]]`]]`]]
Weblink TPL:
<section id="[[+alias]]">
<h1><a href="[[+weblink]]">[[+pagetitle]]</a></h1>
<p><a href="[[+weblink]]">[[+description]]</a></p>
</section>
<hr />
The above TPL doesn't work of course because there's no MODX tag available for it, or if there is I haven't found in the rtfm subdomain.
Here's the actual output from the Weblink TPL from above:
<section id="the-toxins-that-threaten-our-brains">
<h1>The Toxins That Threaten Our Brains</h1>
http://www.theatlantic.com/features/archive/2014/03/the-toxins-that-threaten-our-brains/284466/
</section>
<hr />
Very interesting that MODX `knows` to place the Weblink field right there REGARDLESS of the tags! It ignores the entire "<p><a href="[[+weblink]]">[[+description]]</a></p>" line and sticks the Weblink right there.
So where would I find out how MODX does that so I can control the output, to make it it functional?
Thank you Susan!
[ed. note: ultrasef last edited this post 12 years, 6 months ago.]