Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2019-02-07 12:49:09

etc
Developer
Registered: 2010-11-11
Posts: 3,043
Website

etc_attribute: enable HTML attributes in txp tags

This plugin will (try to) append registered HTML attributes to the output of <txp:tags />. For example, <txp:link /> does not accept style attribute, so passing it, say, style="color:green" would issue a warning. With etc_attribute enabled, style is registered for all tags, so

<txp:link id="1" style="color:green" />

appends style="color:green" attribute to <a /> tag generated by <txp:link />, and we get

<a href=“http://textpattern.com/” style=“color:green”>Textpattern</a>

You can register additional attributes via plugins preferences. Enjoy!


etc_[ query | search | pagination | date | tree | cache ]

Offline

#2 2019-02-07 14:37:24

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,050
Website

Re: etc_attribute: enable HTML attributes in txp tags

This looks wonderfully useful for a couple of cases I can think of!


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

#3 2019-02-08 09:25:21

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 3,112
Website

Re: etc_attribute: enable HTML attributes in txp tags

Nice! This has been a bugbear of mine for years, having to add additional superfluous HTML tags just so I can get a desired attribute onto some HTML (such as ARIA and data-x attributes).

Offline

#4 2019-02-08 14:11:12

etc
Developer
Registered: 2010-11-11
Posts: 3,043
Website

Re: etc_attribute: enable HTML attributes in txp tags

This simplicity is 4.7 global attributes in action, it was not possible before.


etc_[ query | search | pagination | date | tree | cache ]

Offline

Board footer

Powered by FluxBB