Page 1 of 1

How to create a designer template

Posted: Wed Dec 12, 2007 8:14 pm
by cbs48
Hi,

Can someone explain how you can make your own designer template like JulienV did with the Hockey mod?

This component is based on soccer and a lot of other sports can use this as well but sometimes it is still based on the soccer filosophy.

Post your tips here please so noobs like me can try to make an own template without demolish the default one.  :rolleyes:

Re: How to create a designer template

Posted: Thu Dec 13, 2007 12:12 am
by julienV
here is an extract of a message i sent to zeta:

find the 0.92 beta  and an example of templating in this post:
http://www.joomleague.de/forum/latest_b ... 613.0.html

How it works:
* unzip the package components/com_joomleague/frontend/ folder, at the same level as "default" folder containing officials joomleague tpl files
* in the backend, in the project properties, you can now select the template from "design template" dropdown.
* When the user loads a page from joomleague, as usual it first checks if a project was specified in the address (&p=XX). If this is not the cse, the frontpage is loaded. Otherwise, the project is loaded, and joomleague checks if this projects uses a design template. If yes, joomleague tries to load controller.php from the template folder root. In this file, you can switch  on $jl_func and/or do whatever you want, like calling new tpl files, using more classes, etc...

*After controller.php is finished, or if it is not present, the normal switch of joomleague.php is normally triggered (of course, if you changed $jlfunc to a dummy value in the controller, if won't do anything...).

* In the switch on $jl_func inside joomleague.php, joomleague tries to load the tpl files from