Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-09-07 09:33:38

shearstock
Member
From: Dorset, UK
Registered: 2006-01-29
Posts: 18
Website

Is there an Article ID tag? - Page Anchors

I am trying to setup anchors on a page using an h3 with a unique id for each article on the page.

I am currently using… [h3 id=”[txp:title/]”] [txp:title/] [/h3]

And then linking to the anchors with… [a href=”#[txp:title/]”] [txp:title/] [/a]

This method works in FireFox but it is not working in Safari or Opera because there are spaces in the [txp:title/] tags.

What I really need is a tag that will output the article ID number (from the mySQL database) because I can guarantee that it is unique. This way I can keep the page dynamic and easy for the copy-writers.

Thanks for any help you can give!

Offline

#2 2006-09-07 09:38:41

Skubidu
Archived Plugin Author
Registered: 2004-10-23
Posts: 611
Website

Re: Is there an Article ID tag? - Page Anchors

Offline

#3 2006-09-07 10:19:32

shearstock
Member
From: Dorset, UK
Registered: 2006-01-29
Posts: 18
Website

Re: Is there an Article ID tag? - Page Anchors

Skubidu wrote:

Txp:article id /

Awesome! Thanks Skubidu, I feel a bit stupid now cos that was very obvious! Thank you!

Offline

Board footer

Powered by FluxBB