Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-12-25 02:26:32

WhiteDog
Member
From: Maine
Registered: 2005-09-07
Posts: 174

using category and link anchors , is it possible

First let me just say I like to work, and I wish whomever reads this happy holidays!

Now my question, I feel may be possible using rewrites in the htaccess file or perhaps there is a way in txp but this is what I want to do.

Using <txp:article_custom form="default2" category="featured" limit="1" />

This works fine click the article link and it takes you to the archive, but what I would like to do is have it take you to a specific link anchor on the page where the article actually shows up.

Example
currently clicking an article link you get a url of
http://www.mysite.com/articlename

I want it to be
http://www.mysite.com/articlename#featured

where the #featured takes you to the link in the page.
and this #featured could be #favorites or #contact

I know this must be possible somehow, and I have to do it even if it means editing the txp source files. I would just love some advice before I go blindly editing and deleting essential txp files.

Thanks greatly for your time everyone.


Grrr RRR nnndth grrr Skeek!

Offline

#2 2006-12-26 04:31:38

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: using category and link anchors , is it possible

That wouldn’t work if you’re using paging and you’re linking to an article that appears on, say, page three. But if you realize that…

You will need to customize the form you use, to something like:

<a rel="tag" href="<txp:permlink />#featured"><txp:title /></a>

Offline

#3 2006-12-26 16:21:36

WhiteDog
Member
From: Maine
Registered: 2005-09-07
Posts: 174

Re: using category and link anchors , is it possible

Thanks Mary that worked like a charm!


Grrr RRR nnndth grrr Skeek!

Offline

Board footer

Powered by FluxBB