Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2023-03-07 09:08:50

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 809
Website

Attacking the article_listing form ... :o

A nav made of article titles at the bottom of an individual article page with an article_listing form:

<li class="article" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<h4 itemprop="headline">
<a href="<txp:permlink />" itemprop="url mainEntityOfPage" title="<txp:text item="read_more" />">
<txp:title />
</a>
</h4>
</li>

And on the page (Artikelen):

<txp:article_custom section="artikelen" limit="99" form="article_listing" sort="position asc" wraptag="ol" />

What to do to give – in this case – the article title “De stichting” (li) a class “active” so that I can undo the style of a link (underline)?

Offline

#2 2023-03-07 18:31:52

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,094
Website Mastodon

Re: Attacking the article_listing form ... :o

cool! I also like the retro colours!


…. texted postive

Offline

#3 2023-03-07 18:41:26

etc
Developer
Registered: 2010-11-11
Posts: 5,235
Website GitHub

Re: Attacking the article_listing form ... :o

Have you tried something like

<li class="<txp:if_article_id>active </txp:if_article_id>article" ...>

Online

#4 2023-03-07 19:52:31

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 809
Website

Re: Attacking the article_listing form ... :o

etc wrote #334945:

Have you tried something like

<li class="<txp:if_article_id>active </txp:if_article_id>article" ...>...

Bingooooooo … :)

Offline

#5 2023-03-07 19:53:04

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 809
Website

Re: Attacking the article_listing form ... :o

bici wrote #334943:

cool! I also like the retro colours!

Thank you!

Offline

Board footer

Powered by FluxBB