Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-03-26 10:21:12

txpdevcoder
Member
Registered: 2012-06-07
Posts: 58

HTML in link list

Apologies if this is a stupid question but i’ve trawling google and the forum and the docs, and cant see an answer to this. Im trying to use HTML to format the description field in the link list, however it doesn’t seem to work. All I want to do is put <BR> tags in to split some lines.

Am I missing something?

Thanks.

Offline

#2 2013-03-26 10:32:59

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,356
GitHub

Re: HTML in link list

Can you post your page markup and your link form?

Offline

#3 2013-03-26 10:34:13

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,547
Website GitHub Twitter

Re: HTML in link list

can you post the code you use?

Offline

#4 2013-03-26 10:37:08

txpdevcoder
Member
Registered: 2012-06-07
Posts: 58

Re: HTML in link list

Sure…

<txp:linklist category="useful-contacts" wraptag="ul" break="li" class="usefullinks">
<strong><txp:link_name /></strong>
<txp:link_description />
<txp:link />
</txp:linklist>

Offline

#5 2013-03-26 11:03:07

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,547
Website GitHub Twitter

Re: HTML in link list

Hi

then when you add a code like this:

<txp:linklist category="useful-contacts" wraptag="ul" break="li" class="usefullinks">
<strong><txp:link_name /></strong><br />
<txp:link_description /><br />
<txp:link /><br />
</txp:linklist>

The br are not rendered?

Offline

#6 2013-03-26 11:13:55

txpdevcoder
Member
Registered: 2012-06-07
Posts: 58

Re: HTML in link list

No, misunderstanding i think, its the text that gets entered in Textpatterns admins side, in discription box that ignores HTML, it prints it out as text.

Offline

#7 2013-03-26 11:39:44

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,547
Website GitHub Twitter

Re: HTML in link list

Ah you have to explain better next time ;)

looking at txp documentation

you can see that <txp:link_description /> has an escape attribute thta is default to html then change your code like that should work

<txp:linklist category="useful-contacts" wraptag="ul" break="li" class="usefullinks">
<strong><txp:link_name /></strong>
<txp:link_description escape=""/>
<txp:link />
</txp:linklist>

Offline

#8 2013-03-26 11:47:14

txpdevcoder
Member
Registered: 2012-06-07
Posts: 58

Re: HTML in link list

Thanks. Its weird that they made this box do the opposite to what the Write page does. Weird, thanks though ill give i t ago.

Offline

Board footer

Powered by FluxBB