Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-05-26 20:28:05

Jeffrey
New Member
Registered: 2006-05-23
Posts: 6

list but "delink" current article?

I have several index articles in the bibliography section of my Web site. Each of these uses a category of “bibindex” so I can get a naviagation menu listing just these index pages by using

<code><txp:recent_articles category=“bibindex” /></code>

and it gives me exactly what I want — except I would like the link to the article currently being displayed to appear in the list but not be hyperlinked. E.g. if I am viewing the article bibliography-2 I would like the menu to look like

with each title linked to its respective article except bibliography-2.

I tried working with the article_custom tag as suggested in zem’s article and then use if_custom_field and else to either display a permlink or not display a permlink (if the custom field entry of the active article matches the custom field entry of the article being listed in the navigation menu). But I can’ figure out a way to include the custom field value of the active article in the attribute “val=XXXXXXX” of the if_custom_field tag.

From browsing through some related questions here on the forum and elsewhere, I expect it is possible to write a line or two of PHP to do exactly what I want — but I’m a complete beginner when it comes to PHP.

My other solution is to pass a CSS class to each of the li tags used in the navigation menu and then use a CSS declaration to style the link to the active article so that it appears as normal text (although it would still function as a link). But this would clutter up my stylesheet — and it seems like there should be a simpler solution. Maybe I’ve overlooking something obvious?

I hope this all makes sense. Thanks in advance for any help you can provide!

Edit: Never mind. Thanks to some kind help on the Plug-in forum, I was directed to the plug-in glx_hl_current, which does the trick.

Last edited by Jeffrey (2006-05-29 06:05:01)

Offline

Board footer

Powered by FluxBB