Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 Today 12:09:52
Re: Admin theme customisation
Thank you, Stef. That gives a starting idea on the possibilities.
I’ll try to play a little with this over the WE.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
#14 Today 12:11:36
Re: Admin theme customisation
You did it! Looks promising, and makes me question the admin theme role. Our existing themes mostly define css rules and a bit of js to output the hard-coded markup, though they have full php powers. Do they need more flexibility, to be able to define their own presentation? Should core just send them json (say) data and provide some api for read/write requests?
Offline
#15 Today 13:26:26
Re: Admin theme customisation
etc wrote #341388:
You did it! Looks promising, and makes me question the admin theme role.
Precisely. I have actually got (somewhere…) an Admin->Panel class, half finished, which generalises the process of building a back-end screen. That should mesh nicely with this stuff.
If we can get to the point where core has a library of tools, widgets and page building layers that anyone can tap into, the admin theme is basically a collection of these things and some CSS wrapped around data.
We’re definitely on the right track with the UI library, and the Table classes and stuff like that. Theme Prefs adds another string to it, and I’m planning to demo how useful their involvement is in a day or two.
Also, of the panels I’ve converted so far, extending the tables via plugin works (even though it’s not ideal as the core columns always come first). That probably needs rethinking a bit so I might pause where we are and perhaps, as you say, we can retool the way it works as we iterate Txp 5.
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
#16 Today 13:56:07
Re: Admin theme customisation
Okay, it’s only three lines of code so now there’s a helper method in the Theme class to get theme pref values:
$value = $this->get_pref('my_pref_name');
That prepends the name and pipe for you. Much nicer :)
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