Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
permlink with title
Hello, what I’d like to see is something like this
<txp:permlink id="54" title="1" />
(I suppose when used only within a page)
Cheers
Offline
Re: permlink with title
If I understand correctly – txp:permlink already does have a title tag
Offline
Re: permlink with title
Unfortunately, it is coupled with the title
attribute of the tag a
…
What I was thinking to, is a way to avoid writing <txp:permlink id="n">This text</txp:permlink>
Last edited by Manaus (2011-07-08 08:17:27)
Offline
Re: permlink with title
I take it that <txp:permlink id="54"><txp:title /></txp:permlink>
is not satisfactory for what you need?
I was writing the above before you posted:)
Last edited by colak (2011-07-08 08:19:13)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: permlink with title
wet_link renders <txp:wet_link href="42" title="" />
into <a href="http://example.com/article/foo-bar">Foo Bar</a>
.
Offline
Re: permlink with title
Also one could go nuts with yield and output_form, coupled with article_custom, title and permlink.
For example one could create a form named as “p” with the following contents:
<txp:article_custom id='<txp:yield />'>
<a href="<txp:permlink />"><txp:title /></a>
</txp:article_custom>
Everything wrapped by output_form
tags would be used as the article ID and the title would be automatically included in the link. Then to generate link to an article one could simply do:
<txp:output_form form="p">54</txp:output_form>
<txp:output_form form="p">75</txp:output_form>
<txp:output_form form="p">138</txp:output_form>
Which would produce:
<a href="http://example.com/bar/foobar">FooBar</a>
<a href="http://example.com/foo/barfoo">BarFoo</a>
<a href="http://example.com/barfoo/boofar">Boofar</a>
Last edited by Gocom (2011-07-08 09:01:46)
Offline