Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
all-grid, a flexible theme for Textpattern
(Earlier discussion here).
After using all-grid on a few client sites, I’ve found it’s a time-saver when developing a new design, but I always end up adding-to and modifying the code more than I’d like by the time the website goes live. Different clients, differing needs.
I’ve just completed a re-write in an attempt to find a happy medium, and documented its features and how it integrates with Textpattern.
Online
Re: all-grid, a flexible theme for Textpattern
I’ve only briefly looked around, but lots of good ideas in there 👍
TXP Builders – finely-crafted code, design and txp
Offline
Re: all-grid, a flexible theme for Textpattern
I’m interested to hear how others approach building a new site.
Do you have a set install of a customised theme/plugins/css, or do you roll it using a base install and build it up incrementally from scratch?
.
Is Override form regularly implemented? I find it very useful, but with gotchas requiring allowoverride="0"
scattered in misc/head.txp, pages/default.txp and elsewhere.
My approach looks messy:
<txp:if_article_list>
<txp:article status="sticky" form="feature" … />
<txp:article listform="thumb" allowoverride="0" … />
<txp:else />
<txp:article … />
</txp:if_article_list>
compared to this:
<txp:article status="sticky" form="feature" … />
<txp:article listform="thumb" allowoverride="0" … />
which won’t work unless every overridden form used has its own <txp:if_article_list>…<txp:else />…</txp:if_article_list>
logic. I didn’t take that route, as I feel its just dead-weight and extra complexity if Override form is never used.
Online
Re: all-grid, a flexible theme for Textpattern
Didn’t we used to have the ability to use both form
and listform
in the same article tag, and Txp would choose the right one depending if it’s in article list vs individual article context?
Has that gone by the wayside?
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
Re: all-grid, a flexible theme for Textpattern
Bloke wrote #340486:
Didn’t we used to have the ability to use both
form
andlistform
in the same article tag … Has that gone by the wayside?
No, listform
and form
work fine. It’s a pretty essential core concept, it’s just sidestepped in the default theme, so not as obvious.
Adding overrideform="0"
to the article tag suppresses any chosen override form in both article list and individual article views. Logical: I guess that is what it says on the tin.
giz wrote #340485:
… which won’t work unless every overridden form used has its own
<txp:if_article_list>…<txp:else />…</txp:if_article_list>
logic.
I’m guessing Gary’s referring to the fact that if you set allowoverride="0"
in order to get a consistent listform display (for example a consistent “card” for each form), but want your individual article view to vary depending on the chosen override form (for example a gallery, slider, leading quote, whatever…), then you either have to split your if_article_list / if_individual_article logic on your page template (as in the example above, and in the demo site), or alternatively inside each override form.
Suggestion: perhaps the allowoverride
attribute could be extended to allow the values 0
, 1
, form
and listform
? That would solve that case neatly.
TXP Builders – finely-crafted code, design and txp
Offline
Re: all-grid, a flexible theme for Textpattern
jakob wrote #340487:
Suggestion: perhaps the
allowoverride
attribute could be extended to allow the values0
,1
,form
andlistform
? That would solve that case neatly.
That’s an excellent idea. If it’s doable, we should implement this pronto.
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
Re: all-grid, a flexible theme for Textpattern
This is almost as short allowoverride ='<if::individual_article />'
.
And nice theme, btw :-)
Offline
Re: all-grid, a flexible theme for Textpattern
etc wrote #340489:
This is almost as short
allowoverride ='<if::individual_article />'
.
Hell yes! Okay, that needs to go in the docs as an example. Job done.
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
Re: all-grid, a flexible theme for Textpattern
etc wrote #340489:
This is almost as short
allowoverride ='<if::individual_article />'
.And nice theme, btw :-)
I’m happy!
Online