Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2013-03-10 12:15:32
- feragnoli
- Member
- From: the hague
- Registered: 2005-02-10
- Posts: 150
attributes and behavior of 'basic tags'
this might be way off the track and yet…
would it possible considering a standard set of attributes and behavior for all ‘basic tags’?
with basic tags I mean ‘content tags’: title,body,posted,excerpt,image,images (custom fields might belong there too).
atts are already available for the txp:posted tag, why not make them available to title,body and the such? the atts could be the simple ‘wraptag’ and maybe a ‘class’ attribute for content processed through Textile allowing to specify a class for the <p> tags that Textile outputs
conditional behavior could be the conditional output of content only if the tag HAS content (in this example defined by the attribute showalways)
e.g. <txp:body wraptag=‘div’ wrapclass=‘one’ class=‘small’ showalways=‘0’ />
would output the following block of code ONLY if body is not empty:
<div class=‘one’>
<p class=‘small’>
…
</p>
</div>
and this would allow conditional styled output of any tag.
what was that again…?
Offline
#2 2013-03-11 02:45:18
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: attributes and behavior of 'basic tags'
There’re inconsistencies, & there’s, what you might call, “basic” functionality missing too – which plugins have attempted to address (chh_if_data, adi_trim, adi_wrap, smd_wrap, cbe_output_form etc etc).
An if_yield tag is coming in 4.6 and a lot of work is being done behind the scenes by the devs to tidy things up. And there’re some big ideas being thrown around too.
Offline