You are not logged in.
I am struggling to set up some things.
I have experience in Expressionengine, if the url goes like this
www.example.com/gallery/album1 (just an example)
The /album1 is a name of a category
Txp seriously need a tag to fetch the url into the page like this, (my idea for TXP from EE)
so it easier to work with url like this
You can even use that
<txp:if_segment_1!=“gallery”> (not equal because of != instead of ==) Blah blah
<txp:else/> blah2 blah2
So it doesnt matter what section, image, article it going to be. Its more flexible for lots of things, even any type of Permanent link mode you have chosen.
Maybe it will be nice addition for everyone or TXP5 :P
See example here
Conditional example tags here
I work with EE by day, Textpattern freelancing by night.
BTW, I love Txp.
Please provide back with any opinions/feedbacks/blah/blah2
It’s better for portability to use the built-in conditional tags (
if_search, etc.) rather than direct URL parsing. Then you can change permanent link mode without breaking things.
TXP Builders – finely-crafted code, design and txp
And there is also gbp_permanent_links (beware, no help docs, so you will have to figure out stuff by reading —or asking at— the plugin thread or by trial/error).
While gbp_permanent_links most known/important/commonly-used feature is to let you generate other URL schemes, there is a somewhat hidden feature that lets you assign different page templates to different URL schemes.
Example: for you
/gallery/ section you could use the “gallery” page template, and for your
/gallery/album1 you could use the “gallery-album” page template.
This approach has the advantage, imho, of making templates less cluttered of conditionals (
if_category, and others). It has the “disadvantage” or requiring a plugin, and having to create/maintain a few more templates.
La música ideas portará y siempre continuará
mmm, gbp_permanent_links looks interesting, I will have a spin with it soon. I am trying hard to avoid <txp:variable/>
I think it time for me to shift my status of php skills from below-average noob to above-average noob to achieve full understanding to use those.
Thanks for pointing the direction.
Last edited by Dimitri (2010-12-28 23:01:34)