Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#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
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>
Offline
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