Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2021-01-31 16:41:38

marios2
Member
From: Germany
Registered: 2019-07-31
Posts: 76

if_article_section

What is the difference between if_section and if_article_section. Does it not do the same thing?

rgrds marios.

Offline

#2 2021-01-31 16:49:53

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,596
Website

Re: if_article_section

  • if_section responds to current section in the browser url OR to the current iteration of a txp:section_list loop.
  • if_article_section checks the article section that an article is assigned to.

An example might be if you have a list of articles from different sections, e.g. using article_custom, or if you have a textpattern form that can be used in multiple article contexts and want to put certain information only if an article is assigned to a particular section (e.g. date/time infos in an article that is assigned to the “event” section).


TXP Builders – finely-crafted code, design and txp

Offline

#3 2021-01-31 18:47:27

marios2
Member
From: Germany
Registered: 2019-07-31
Posts: 76

Re: if_article_section

Ok, … that explains it to the point. ( Not so in the documentation though )
Plain and simple thing,…
…rgrds marios.

Offline

Board footer

Powered by FluxBB