Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
(perma)link to anchor (or id) inside an article...
Hi,
I want to create a (perma)link to a specific point within an article (and not the top of the article)… I’m using a < div id=“xx”> to identify the spot, but could use < a name=“xx”> all the same…
The question is, how do I create this link?… permalinks don’t seem to allow a “#I_WANNA_GET_HERE” modifier…
Concrete example:
I’m creating a list of entries (within a page template) that selects articles in a specific section like this:
<pre>
#################################
< txp:article_custom form=“article_x_list” limit=“10” section=“my_sect” sortby=“Posted” sortdir=“asc” listform=“article_x_list” />
< txp:if_individual_article>
< txp:article limit=“1” form=“article_x” />
< /txp:if_individual_article>
#################################
</pre>
The form “article_list_x” has only the following (and here is where I want to point to the specific anchor):
<pre>
#################################
< txp:permlink>< txp:title />< /txp:permlink>< br />
#################################
</pre>
And the form “article_x” has something along the lines of the following:
<pre>
#################################
< h3>< txp:permlink>< txp:title />< /txp:permlink>< /h3>
TIA
Mariano Absatz – El Baby
I don’t suffer from insanity. I enjoy every minute of it.
Offline
Re: (perma)link to anchor (or id) inside an article...
I am not sure exactly what are you trying to do, but this is something I whipped up a few months ago. It might give you some ideas.
Offline
Re: (perma)link to anchor (or id) inside an article...
Well… yes… that was what I wanted… <strong>NOW</strong> that I read <em>CLOSELY</em> <a href=“http://textpattern.net/wiki/index.php?title=Txp:permlink”>the entry in the TextBook</a> I see the reference to the <a href=“http://textpattern.net/wiki/index.php?title=Glossary#Single_Tag”>Single_Tag</a> mode of the permlink, which is what I needed.
Thanx a lot for pointing me…
FWIW, I changed the form “article_list_x” from:
<pre>
#################################
< txp:permlink>< txp:title />< /txp:permlink>< br />
#################################
</pre>
and I got what I wanted.
Thanx again.
Mariano Absatz – El Baby
I don’t suffer from insanity. I enjoy every minute of it.
Offline
Re: (perma)link to anchor (or id) inside an article...
Being able to use the permalink tag in single mode was a late but welcome addition to the code base.
Offline