Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-02-23 16:02:11

oldi
Member
Registered: 2005-10-14
Posts: 87

change permlink to point to a section rather than article

I have a static site. When i get the results from a search all the links are pointing to the articles. Because of the nature of the site i would like the permlink to point to the section where that article is displayed. Is it possible to do this?

thanks

Offline

#2 2006-02-23 16:54:41

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: change permlink to point to a section rather than article

Hi oldi.

I think you can…

In your search_results form (an article form), you can try something like:

<code><h3><txp:section title=“1” link=“1” /></h3>
<p><txp:search_result_excerpt /><br/>
Visit our section <txp:section title=“1” link=“1” />
</p></code>

When in article form, txp:section is sensitive to the article section.

Also, you can try some conditional magic of <txp:if_article_section>###</txp:if_article_section>


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2006-02-23 21:13:54

itswoody
Member
Registered: 2006-02-16
Posts: 14
Website

Re: change permlink to point to a section rather than article

Wow this maybe my first chance to help some one!! I had a similar problem, this is what you do: (be advised this will only work if you use clean urls)

replace
<code><txp:permlink><txp:title /></txp:permlink></code>
with:
<code><a href=”/<txp:section />”><txp:title /></a></code>

DaDa!!

Last edited by itswoody (2006-02-23 21:15:06)

Offline

Board footer

Powered by FluxBB