Revision [8657]
This is an old revision of TemplateSystem made by JavaWoman on 2005-05-29 09:29:02.
Using a templating system
It would be nice to see a template engine in Wikka to give the users the full control over the HTML source.Templating systems under discussion
Discussion
Give control over HTML (using a templating system)
(copied from SuggestionBox --NilsLindenberg)It would be nice to see a template engine in Wikka to give the users the full control over the HTML source. Smarty is always a good choice.
- I would love to see Wikka adopt some type of template system. I think that its is sorely needed. Changing the look of Wikka requires tedious editing of php files, and alot of the time it is non-obvious where you need to go to edit such files. Another alternative to Smarty could be Savant. --KickTheDonkey
- While I use and like Smarty very much (and it's quite fast), it's rather "heavy" for Wikka, I think. I just had a look at Savant2 which I hadn't heard of before. It looks like a good fit, is lightweight and easy to use. A templating system like this would also provide much more flexibility for Wikka admins to have control over page structure and layout. I'll want to play with it some (in combination with Wikka), but my first impression based on documentation and code is very favorable. More when I've had a chance to exercise it. --JavaWoman
- I'm sorry JW, but what do you mean by Smarty being rather "heavy" for Wikka? Resource-wise? Hard to use / implement? Difficult for the end user? -- FernandoBorcel
- Fernando, I mean it's "heavy" in two respects, actualy: 1) in terms of code size (currently Smarty is 137K compared to Wikka's 524K - zipped - while for instance Savant is only 39K); 2) in terms of usability - while it's quite powerful, there is a rather steep learning curve for those who've never worked with templates; Savant is simpler and much easier to learn, and looks still quite flexible. I'm not sure about resource usage, but I suspect that in that respect it might be heavier than Savant as well. We'd like to keep Wikka easy to use both for WikiAdmins and for WikiUsers. I still have to actually try Savant with Wikka, but from what I've see so far it fits our profile better, I think. Anyway, before we go forward with something like this, more research will be needed. --JavaWoman
- I would propose using a 'lite' templating engine such as XTemplate, it's a simple tag language, it keeps most of the logic in the PHP and hey, I maintain it. I use Wikka for at least 3 sites including the XTemplate site - so I'm about to help integrate and develop with Wikka. Oh and by the way, it's only 28k including the comments ;) XTemplate in combination with a DatabaseAbstraction layer such as ADODB would go a long way to making Wikka more maintainable than it is at present. -- JeremyCoates
Editable header/footer
(moved from SuggestionBox --JavaWoman)It is quite cumbersome to edit the header and footer at the moment.
Some of it has to be done in the actions files, and the menuitems in the config file. This means I can't safely allow users to edit them.
What I would like, is a system that allows easy creation of non-default headers/footers (so you can get a different menu in different parts of the site).
--OnkelJonas
- You may find the following pages interesting: UserMenus, WikkaMenus. --NilsLindenberg
CategoryDevelopmentArchitecture CategoryLayout