资源 ID 的电视输出 url 标题

发布于 2025-01-05 11:24:40 字数 129 浏览 3 评论 0原文

当我创建一个多选输入时,我可以在其中选择资源,并且我希望输出成为该资源的链接。我怎样才能链接到阅读/显示我链接到的页面的标题?我找不到任何相关信息。

我尝试过 [[*pagetitle]],但链接文本是我当前所在页面的页面标题。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

北斗星光 2025-01-12 11:24:40

假设您的电视输出您要链接到的资源的 ID,您可以使用 getResourceField

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

更多关于如何使用它在这里:
http://rtfm.modx.com/display/ADDON/getResourceField

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

Smile简单爱 2025-01-12 11:24:40

尝试 [*pagetitle*][*#pagetitle*]

第一个应该可以正常工作。

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

first one should work fine.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文