Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
How do I link to another article from within an article?
Is there an easy way to link to another existing article from within an article, without having to hardcode the link? I don’t want to hardcode the link in case I change the url structure from messy to clean.
I would think there would be an easy way to do this, but I can’t seem to figure it out.
I am hoping there is a plugin or something that can generate a list of all articles that I can see whilst editing an article. Then I can just click on it to add a link to an article.
Offline
Re: How do I link to another article from within an article?
You might want to try zem_link. You can make it build the link using the Article ID and that remains the same regardless of url structure.
TXP Builders – finely-crafted code, design and txp
Offline
Re: How do I link to another article from within an article?
Ah ok, that does work, but I’m surprised there’s nothing something more user-friendly than that. Cheers!
Offline
#4 2006-12-18 14:32:47
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: How do I link to another article from within an article?
<txp:permlink id="xx" />
(TextBook).
Edit: actually the single tag only outputs the url, so you’d have to do something like
<a href="<txp:permlink id="xx" />">Link text</a>
The container tag does produce a link:
<txp:permlink id="xx">link text</txp:permlink>
The first line of code has the advantage that you can add title, class and other attributes.
Last edited by els (2006-12-18 14:44:34)
Offline
Re: How do I link to another article from within an article?
OK.
What I was hoping for was for the admin interface to display a list of all other articles. All the user would need to do is highlight some text in their article, and click an article from the list to generate a hyperlink to it, using the highlighted text as the text link.
Sounds like there’s nothing around that is that user-friendly.
Offline
#6 2006-12-18 22:14:56
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: How do I link to another article from within an article?
cade wrote:
Sounds like there’s nothing around that is that user-friendly.
Unfortunately there isn’t. You’d have to create or request a plugin.
Offline