In this post I'm going to list for you the PHP Hooks that you can use to insert content into your free Joomla templates, remember they're free because you're doing them, which is always the best! PHP Hooks are my word for the functions that Joomla has opened up to the template, kind of like an API but not. They just hook into the Joomla framework. You can find the code for these functions in includes/frontend.php.
The Hooks are as follows:
mosCountModules(position): this hook is useful when trying to figure out if there are any modules in a certain position. Using a conditional construct you can say that if there are no modules (returns 0) in a specific position then don't write the container that you would put the modules in. This is helpful when you are trying to remove any unnecessary output from Joomla.
mosShowHead(): this hook shows the header information. The header information includes META tags, JavaScripts, and CSS. All header information is dynamicly put together via publishing (mambots/plugins).
mosMainBody(): this hook prints the "option" component to the screen. This is specified in the URL. Theres not much to say about this one except if you don't put it in your template you won't see much!
mosLoadModules(position, style): I've already explained in a previous post about this hook, but basically it prints out a module position utilizing a certain type of HTML or XHTML compliant output. You'll need to use arguments to express this.
mosLoadComponent(name): This hook isn't used as much because you're already using mosMainBody, but this allows you to add a component to your template, albeit not dynamic like mosMainBody, but it can be an advantage if you want to keep a certain component always on the page. The name of the component needs to be added as an argument ("com_name" without "com_").
Hope this helps. Tell me what you think.
Technorati Tags: joomla templates, free joomla templates, joomla hooks, mosmainbody, mosloadmodules, joomla packages
The Hooks are as follows:
mosCountModules(position): this hook is useful when trying to figure out if there are any modules in a certain position. Using a conditional construct you can say that if there are no modules (returns 0) in a specific position then don't write the container that you would put the modules in. This is helpful when you are trying to remove any unnecessary output from Joomla.
mosShowHead(): this hook shows the header information. The header information includes META tags, JavaScripts, and CSS. All header information is dynamicly put together via publishing (mambots/plugins).
mosMainBody(): this hook prints the "option" component to the screen. This is specified in the URL. Theres not much to say about this one except if you don't put it in your template you won't see much!
mosLoadModules(position, style): I've already explained in a previous post about this hook, but basically it prints out a module position utilizing a certain type of HTML or XHTML compliant output. You'll need to use arguments to express this.
mosLoadComponent(name): This hook isn't used as much because you're already using mosMainBody, but this allows you to add a component to your template, albeit not dynamic like mosMainBody, but it can be an advantage if you want to keep a certain component always on the page. The name of the component needs to be added as an argument ("com_name" without "com_").
Hope this helps. Tell me what you think.
Technorati Tags: joomla templates, free joomla templates, joomla hooks, mosmainbody, mosloadmodules, joomla packages
No comments:
Post a Comment