Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-12-04 18:51:49

proph3t
Member
Registered: 2004-09-26
Posts: 31

txp tag inside of another?

I’m trying to use this in a page:

<code><txp:article_custom form=“pagedefault” section=”<txp:section />” /></code>

For some reason it’s not working (outputs all articles and after the last article it shows <code>” /></code>), am I not allowed to output a txp tag inside of another? How would I achieve something like this?

Using 4.0.2

Last edited by proph3t (2005-12-04 18:52:04)

Offline

#2 2005-12-04 19:52:07

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: txp tag inside of another?

What is it you want to do? Output articles in the current section?
<code>
<txp:if_section name=”“>
<txp:else />
<txp:article listform=“pagedefault” />
</txp:if_section>
</code>
If you only want it for certain sections, use <txp:if_section name="section1,section2"> and no <txp:else />.

(Edit: wow, my 1000th post!)

Last edited by doggiez (2005-12-04 19:53:58)

Offline

#3 2005-12-04 20:10:25

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: txp tag inside of another?

am I not allowed to output a txp tag inside of another?

No, you are not allowed, as far as I know.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#4 2005-12-04 20:27:49

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: txp tag inside of another?

No you can’t, but looking at your tag I would suggest that <code><txp:article form=“pagedefault” /></code> would do exactly the same thing in any section because it is context-sensitive.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#5 2005-12-04 20:44:24

proph3t
Member
Registered: 2004-09-26
Posts: 31

Re: txp tag inside of another?

My problem is that I want to do the following with the site:

Use ONE template, but have different sections (so each section will be a page). EACH page should display a list of articles obviously based on that section. Then, each article when clicked on would just show the article on the basic /article/ page.

How could I do this without using a billion pages/categories/sections?

An example: http://www.winatpoker.com (site I created with textpattern). On the left menu you can click, say “Omaha 8 or Better Articles” and then find a list of those articles. Then you can click each article to read them.

On that site I used a bunch of unique pages/sections/categories for each one. For example: Omaha8orbetterarticles, Omaha8orbetterrules, Omaha8orbetterstrategy for all each page/section/cat. I know its possible to make it using just one template, but how would I do so?

EDIT: Got it using the advice above, i had typed it in wrong but now I see it works. Thanks.

Last edited by proph3t (2005-12-04 21:00:27)

Offline

#6 2005-12-04 20:56:14

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: txp tag inside of another?

For each section:-

<code><txp:if_section name=“sectionName”>
<txp:article />
</txp:if_section></code>
<br />

You can add form and limit to the article tag as well.
If several sections use the same template you can use a comma-separated list in the name.

Last edited by thebombsite (2005-12-04 20:57:15)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#7 2005-12-05 06:24:59

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: txp tag inside of another?

Sencer once provided a method of a tag-in-tag workaround.

Last edited by wet (2005-12-05 06:25:17)

Offline

Board footer

Powered by FluxBB