Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-05-30 18:08:24

David Andersson
Member
Registered: 2006-05-20
Posts: 10
Website

href one article from another

How can I refer to an article from within THIS article.

To be extra clear, an example:

I’m writing a post. I want to refer to something interesting I wrote in another post. Today I do this via the hard URL which is bad for obvious reasons. I’m sure I’m missing something quite easy here. Greatful for any help.

— David

Offline

#2 2006-05-30 19:20:05

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: href one article from another

I think Zem_link is the solution (though you’ll want this one from wet.)

Last edited by deldindesign (2006-05-30 19:24:13)

Offline

#3 2006-05-30 20:25:02

David Andersson
Member
Registered: 2006-05-20
Posts: 10
Website

Re: href one article from another

Exactly. Thanks much.

Strange that this functionality isn’t in the main track.

Offline

#4 2006-05-30 20:28:08

ramanan
Plugin Author
From: Toronto
Registered: 2004-03-12
Posts: 323
Website

Re: href one article from another

I think it’s actually better to use Textile. If you ever switch CMS systems, having all these txp tags in your blog posts is going to be a pain.

Offline

#5 2006-05-30 22:11:47

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: href one article from another

ramanan wrote:

If you ever switch CMS systems, having all these txp tags in your blog posts is going to be a pain.

Actually every article posted to a Textpattern run site is saved in whatever markup you used and a plain html version. Checkout the textpattern table in your database, the Body and Body_html fields, also the Title and Excerpt are treated similarly.

Offline

#6 2006-05-31 05:12:17

David Andersson
Member
Registered: 2006-05-20
Posts: 10
Website

Re: href one article from another

Hmmm…. I want to avoid the following;

href=“2005/06/29/my-article-name”

Such a reference will break if I ever change or update that article.

I want to be able to refer to an article like so:

href=“a_constant_id_no_matter_what”

so to ramanan: How do I go about using textile for this? As I see it Textile is just a way of writing HTML without writing HTML.
to hcgtv: I could check out those tables but are you sure we are talking about the same thing? It’s not practial for me to be checking the tables each time I want to refer to an article. I just want to be able to refer to the article ID (or some other constant) instead of something that could change.

I really appreciate the help here but I have a feeling we’re not talking about the same thing. I think deldindesign’s suggestion solves it or is there a way to accomplish this without plugin?

Offline

#7 2006-05-31 13:42:02

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: href one article from another

David Andersson wrote:

I think deldindesign’s suggestion solves it or is there a way to accomplish this without plugin?

Not without a plugin. zem_link is very easy as you only need the article id, the tag is something like <txp:zem_link href="24" />.

Offline

#8 2006-05-31 13:54:29

ramanan
Plugin Author
From: Toronto
Registered: 2004-03-12
Posts: 323
Website

Re: href one article from another

I think hcgtv was addressing me, those tables won’t help you out. Niether will my suggestion. I was just saying that IMHO its more of a nuisiance dealing with txp tags in your entries then dealing with bad URLs.

And zem_link looks to do what you want.

You can always mod_rewrite your URLs after the fact. So I think you shouldn’t worry TOO much about breaking URLs.

Offline

#9 2006-05-31 14:56:17

David Andersson
Member
Registered: 2006-05-20
Posts: 10
Website

Re: href one article from another

ok. thanks guys. I’ll go with zem_link as suggested.

Offline

Board footer

Powered by FluxBB