Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-09-05 00:33:26

carrotrope
Member
From: Edinburgh
Registered: 2007-03-16
Posts: 39

Using if_section in an article_custom form

Hi all,

Developing a new site which has three distinct areas. Each has its own page with only entries relevant to that area, but the front page aggregates all entries into one big list, with the entries being distinguished by colour.

My issue is that I am using the following tag to create that overall front-page list:

<txp:article_custom pgonly=“0” form=“fp_snippet” />

And that form looks something like this:

<txp:if_section name=“x”>
(code to format excerpt of entry in section x)

<txp:if_section name=“y”>
(code to format excerpt of entry in section y)

<txp:if_section name=“z”>
(code to format excerpt of entry in section z)
</txp:if_section>

Sadly, this doesn’t seem to work. The form doesn’t seem to recognise the if_section values and simply formats the articles with the default form. How can I achieve this?

Best,
Jez

Offline

#2 2008-09-05 00:43:58

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,453
Website GitHub

Re: Using if_section in an article_custom form

Have you tried <txp:if_article_section> instead of <txp:if_section> ? The front page section (“default”) isn’t changing, which is probably why you’re getting them all rendered in the default form.

Edit: incidentally, does article_custom support the pgonly attribute? It’s not listed

Last edited by Bloke (2008-09-05 00:45:47)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2008-09-05 02:22:55

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Using if_section in an article_custom form

Bloke wrote:

Edit: incidentally, does article_custom support the pgonly attribute?

What would article_custom even do with pgonly attribute when it is non context sensitive ;)

It doesn’t return any error, but either way, it doesn’t do anything when used with article_custom. So, if your into extra typing, then go ahead.

Last edited by Gocom (2008-09-05 02:25:38)

Offline

Board footer

Powered by FluxBB