Joomla Template Tutorial - Part 6: In Joomla Template, the important thing is jdoc tag. As you see at below picture, jdoc tag is a way load module, component, and head component (like title, description, keywords, etc). In this post, we will try to use jdoc tag.
I just rememberring picture that placed jdoc in blocks.
Joomla Template Tutorial - Part 5: Before put content, we must design the blocks where module or component placed. In this posting, we use ‘classic’ HTML (I mean, use <table> not <div>).
Our layout target like following picture:
Ok, open index.php within folder mytemplate. Enter following code:
< ?
// no direct access defined('_JEXEC') or die('Restricted access');
? >< html >< head ></ head >< body ><table border="1" width="100%" bgcolor="#ffff00"><tbody><tr><td colspan="3">Top</td></tr><tr><td colspan="2">User 3</td><td>User 4</td></tr><tr><td rowspan="2">Left</td><td colspan="2"><table border="1" width="100%"><tbody><tr><td>User 1</td><td>User 2</td></tr></tbody></table></td></tr><tr><td height="200">Component</td><td>Right</td></tr><tr><td colspan="3">Footer</td></tr></tbody></table>< body >< html >
Joomla Template Tutorial - Part 4: After create ‘embryo’ joomla template, now, we try to activate the template. In Joomla, we make this template as default.
Login to Joomla as administrator.
Click Extensions > Template Manager.
You can see template list like below:
Choose mytemplate by click radio button in front of mytemplate.
Click Default button on top.
Now, when you point your browser to localhost/joomla, you can see ‘nothing’. Yup, because template used has changed. Active template is mytemplate. But we don’t define anything in this template. So, we just see blank page.
Joomla Template Tutorial - Part 3: Now, we will build our first joomla template. We start from simplest layout. This posting focus on step by step creating simple joomla template.
Open folder where joomla template placed. Assuming, the template folder within www/joomla/.
Create folder, named “mytemplate”.
Open mytemplate folder. Create a file name “index.php”.
Create a file named “templateDetails.xml”. Enter following code:
Joomla Template Tutorial - Part 2: Before write Joomla template code, we will imagine what code that we will write. I draw ‘code’ in module posible position picture. This picture may help you easy understand how to write code in next step. You will see more clear.
From picture above, I think you can catch idea… It is simple, isn’t it?
Make your own Joomla Template - Part 1: Before learn about joomla template, we must clear different of modules and components. Modules and components will be dominant topic when we talk about template in Joomla. Because content all of page is that items. For clearly, you can see this picture:
In above picture, you can see like blocks. It represent posible position at joomla template. We can draw it simple like below:
How I know about posible positions? Simple, just login as administrator. Open Extention > Module Managers. You can see list posible position at dropdown.
Ok, we will improve our first picture become like this:
Next post, we will talk detail about module position.