Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2016-02-19 15:37:51

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

css selectors and html tags in the link description

I’m listing some links and related descriptions in an article, setting a specific article template, who calls the links by category, which matches the article ID.
So when I call a certain article, all the related links are listed and beside them are listed the related descriptions too.

But I can’t get all works because I see the CSS selectors <div></div> in the link description are not recognized as CSS, so I can’t apply the CSS classes to them. Why that?

Last edited by Bongo-man (2016-02-19 16:00:19)

Offline

#2 2016-02-19 17:45:29

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: css selectors and html tags in the link description

Hi Bongo-man, Apologies but I did not fully get it. Is there a link you can point us to?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2016-02-19 18:41:58

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: css selectors and html tags in the link description

It is not useful a link. Nothing to link at present.
This is my expression placed in the template of the article.

<txp:linklist category='<txp:page_url type="id" />' limit="25"> 

<tr>
        <td class="link">
        <txp:link><txp:link_name /></txp:link>
        </td>
        <td class="description">
        <txp:link_description wraptag="div" />    
        </td>
</tr>

</txp:linklist>

Example: I create an article whose id is = 1234

Acting this way all the links & related descriptions whose category is 1234 are listed in the article.
All works good, but the description.

Infact I’ve some html tags in the link-descriptions and they are not interpreted by the browser,
so that although I’ve the background-color of the description, the html tags are written as any other word.

Last edited by Bongo-man (2016-02-19 18:44:46)

Offline

#4 2016-02-19 18:53:38

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: css selectors and html tags in the link description

Try <txp:link_description wraptag="div" escape="" />

Offline

#5 2016-02-19 19:21:20

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: css selectors and html tags in the link description

Thank you very much.

All displays good now.

Offline

Board footer

Powered by FluxBB