I wanted to allow members of one user group to be able to set Resource Type, but hide the Link Attributes field and set all Weblink Resources to open in a new window/tab by default.
So, I created a Customisation Profile for that user group, set the Link Attributes (link_attributes) default value to
target="_blank", and then made it hidden, thinking that this field was used only for resources with Weblink Resources.
This turned out to be wrong, as from then on, every Document Resource edited and saved had target="_blank" included in its menu link. New tabs galore...
I fixed this by emptying the
modx_site_content.link_attributes column in the database.
Then I re-added target="_blank" into the Link Attributes field for two Weblink Resources. But this didn't work. I discovered that I didn't have [[wf.attributes]] in my Wayfinder rowTpl. So how had all the target="_blank" link_attributes got into my menu links?..
The docs for Resource Fields (here
https://rtfm.modx.com/revolution/2.x/making-sites-with-modx/structuring-your-site/resources) say:
link_attributes - Used with menu building snippets to add attributes to links, etc. Can be repurposed for other needs.
I can't see a mention anywhere of any automated inclusion of resource attributes in MODX-generated URLs, but is this what is happening?
Is there any mechanism in MODX which uses resource attributes other than as described in the above docs page?