Wiki source for TemplateSystem


Show raw source

=====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===

- [[http://smarty.php.net | Smarty]]
- [[http://wiki.ciaweb.net/yawiki/index.php?area=Savant | Savant]]
- [[http://www.phpxtemplate.org/ | XTemplate]]
- [[http://templatepower.codocad.com | Template Power]]

====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 [[http://smarty.php.net | Smarty]] could be [[http://wiki.ciaweb.net/yawiki/index.php?area=Savant | 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 [[http://www.phpxtemplate.org/ | 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 [[http://adodb.sf.net | ADODB]] would go a long way to making Wikka more maintainable than it is at present. -- JeremyCoates
~~~~~~&As I am soon about to release my conversion of Wikka to the PostNuke CMS, you can see an example of a Smarty implementation on [[FrankChestnut | my page]] along with the DatabaseAbstraction page I created recently while working on my module. Note also that my module will be multilingual although I'll still have to work with my collegues on the best solution for the various part of Wikka that can't be translated by a simple define. ;) -- FrankChestnut

===actually the predecessor did use the include command===

See please [[http://puppylinux.org/wikka/AboutPuppy]]: a predecessor did use the include command to build a template at the top of the page and it works properly. On a next page: [[http://puppylinux.org/wikka/dpup]], you will see an important left rand informations group. I did try to realize these group with an include command but without success. In will use an { { include LeftRand } } instead of all the commands from following listing. can one of you help to make it working (perhaps directly in the right page ;-) ! it would be the best! after that, you can erase here the following code if it's work properly!)? center table width=98% border=0 cellspacing=3 cellpadding=7 bgcolor=#FFFFCC tr align=top td align=right width=99% h1 FONT face=Times New RomanibPuppy Linux Mini How-to  'b'i'font 'h1 'td 'tr 'table 'center table width=100% border=0 cellspacing=10 cellpadding=0 tr align=top td align=left valign=top bgcolor=#c8e3ff width=20% table cellspacing=0 border=0 tr td bBasics'b 'td 'tr tr td font face=Verdana   - a href=aboutAbout'a 'font 'td 'tr tr td font face=Verdana   - a href=installInstallation'a 'font 'td 'tr tr td font face=Verdana   - a href=startGetting Started'a 'font 'td 'tr tr td bSoftware'b 'td 'tr tr td font face=Verdana   - a href=wmWM'a 'font 'td 'tr tr td font face=Verdana   - a href=roxRox Filer'a 'font 'td 'tr tr td font face=Verdana   - a href=pgetPupGet'a 'font 'td 'tr tr td font face=Verdana   - font color=darkbluebDotpup'b'font 'font 'td 'tr tr td bHardware'b 'td 'tr tr td font face=Verdana   - a href=videoVideo'a 'font 'td 'tr tr td font face=Verdana   - a href=soundSound'a 'font 'td 'tr tr td font face=Verdana   - a href=networkNetworking'a 'font 'td 'tr tr td font face=Verdana   - a href=inputInput Devices'a 'font 'td 'tr tr td font face=Verdana   - a href=othersOthers'a 'font 'td 'tr tr td bGoodies'b 'td 'tr tr td font face=Verdana   - a href=gamesGames'a 'font 'td 'tr tr td font face=Verdana   - a href=linuxLinux Tutorial'a 'font 'td 'tr tr td font face=Verdana   - a href=moreMore'a 'font 'td 'tr tr td bLinks'b 'td 'tr tr td font face=Verdana   - a href=puplinksPuppy'a 'font 'td 'tr tr td font face=Verdana   - a href=morelinksOthers'a 'font 'td 'tr tr td bMiscellanea'b 'td 'tr tr td font face=Verdana   - a href=miscMisc'a 'font 'td 'tr 'table 'td -- NeW

===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
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki