Meddie
Meddie

Reputation: 557

TV output url title of resource id

When I create a multi select input where i can select resources and I want the output to be a link to that resource. How can I get to link to read/show the title of the page i'm linking to? I can't find any info about that.

I've tried [[*pagetitle]], but then the link text is the pagetitle of the page i'm currently on.

Upvotes: 3

Views: 1960

Answers (2)

dsgsd
dsgsd

Reputation: 1

try [*pagetitle*] or [*#pagetitle*].

first one should work fine.

Upvotes: 0

okyanet
okyanet

Reputation: 3146

Assuming your TV outputs the id of the resource you want to link to, you can use getResourceField:

<a href="[[~[[*yourTV]]]]">[[getResourceField? &id=`[[*yourTV]]` &field=`pagetitle`]]</a>

More on how to use it here: http://rtfm.modx.com/display/ADDON/getResourceField

Upvotes: 3

Related Questions