Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2009-04-29 10:27:57
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
pluggable_ui & default markup
Could the new pluggable_ui function make the “default” markup available to plugins? This would enable the plugin to modify the markup rather than have to recreate it from scratch.
Offline
Re: pluggable_ui & default markup
One of the intentions of pluggable_ui() is to decouple plugins from core markup, to shelter them from markup changes in future core version. Plugins which modify the core’s markup are once again tightly coupled into a specific core version’s output, which would rather contradict the original intention.
Please explain what benefit we’d expect from your proposal.
Offline
#3 2009-04-29 13:01:05
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: pluggable_ui & default markup
Isn’t the whole point of pluggable_ui to modify the “core” markup?
As it stands, if I’ve understood it correctly, there’re two plugin options with pluggable_ui:
- don’t use it (i.e. use the old slice & dice inject method)
- use it but create explicit markup
Fair enough. However, if all I wanted to do was add, say, an HTML attribute then it would be better to take the original, modify it slightly and then feed it back into the page.
This would have some advantages:
- the plugin would be future-proofed – i.e. by basing the markup modification on what’s supplied, we don’t have to worry so much about future TXP admin changes
- the same plugin code could be applied to many instances on a page
Offline
Re: pluggable_ui & default markup
Sounds reasonable. Implemented in r3188.
Offline
#5 2009-04-30 14:05:18
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: pluggable_ui & default markup
Thanks, you’re a gentleman.
Offline
Pages: 1