Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Find links to other articles from article screen?
Say I’m writing an article and want to link to a second article. Is there an easy way to find the second article’s URL without leaving the write tab?
I thought there was a plugin that let you do things like that, but I can’t find one.
Offline
Re: Find links to other articles from article screen?
Hi.
Why not to use this tag? Into your article body (Textile format):
<txp:permlink id="94" title="Read article...">Article...</txp:permlink>
Change id
attribute with the desired article unique identifier (maybe the previous one; see documentation here).
Are you looking for this plugin? wet_quicklink
Last edited by Pat64 (2023-07-19 06:14:20)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: Find links to other articles from article screen?
An even better route might be to make a shortcode. That encapsulates everything so if the method of access changes or you want to alter or style the links you can do it in a single place.
But yes, the quicklink plugin is a good alternative.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Find links to other articles from article screen?
Pat64 wrote:
Are you looking for this plugin? wet_quicklink
That’s the one! But looks like it’s not maintained anymore. <sad trombone>
Offline
Re: Find links to other articles from article screen?
Bloke wrote #335572:
An even better route might be to make a shortcode. That encapsulates everything so if the method of access changes or you want to alter or style the links you can do it in a single place.
So, maybe you could use this (form name link
):
<txp:if_yield name="id"><a rel="bookmark" href="<txp:permlink id='<txp:yield name="id" />' />"<txp:if_yield name="tooltip"> title="<txp:yield name="tooltip" />"</txp:if_yield>><txp:if_yield name="title"><txp:yield name="title" /></txp:if_yield></a>
</txp:if_yield>
Usage: <txp::link id="99" tooltip="Read" title="Article 99" />
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: Find links to other articles from article screen?
Yeah, or embellish it slightly with some default
goodness:
<if::yield name="id">
<a rel="bookmark" href="<txp:permlink id='<txp:yield name="id" />' />"<if::yield name="tooltip"> title="<txp:yield name="tooltip" />"</if::yield>>
<article::custom id='<txp:yield name="id" />'><txp:yield name="title" default='<txp:title />' /></article::custom>
</a>
</if::yield>
That will default to the actual article title if you don’t specify one to override the link text. Untested, but something like that should work.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline