A tutorial for making a Joomla 1.5 template?

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Forum rules
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
Locked
User avatar
poring
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Oct 02, 2006 6:37 am

A tutorial for making a Joomla 1.5 template?

Post by poring » Mon Oct 02, 2006 8:07 pm

Is there a tutorial for Joomla 1.5 templating yet? I've heard that the new 1.5 is different significantly in terms of design from 1.0. I want to get something started right now, but I'm just not sure whether the beta or the future updates will make a template based on alpha invalidated.

Edit: I'm currently reading the source code of the default template to make my own. This might help some of you that are doing the same: http://dev.joomla.org/component/option, ... d,33/p,30/. You can also read the source code of the default template of the 1.5 Joomla package to get an idea on how the new templating system works. Once I get all of it figured out, I'll make a easy-to-understand tutorial for designers.
Last edited by poring on Tue Oct 03, 2006 7:54 pm, edited 1 time in total.

User avatar
r0tt3n
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Wed Dec 14, 2005 8:32 pm
Location: Call Eee Phorn Yah
Contact:

Re: A tutorial for making a Joomla 1.5 template?

Post by r0tt3n » Wed Oct 04, 2006 9:51 am

Nice thinking poring!  With 1.5 right around the corner, that tutorial will be a very valuable resource for everyone!
"Quis Custodiet Ipsos Custodes?" - Juvenal

Literal Translation: Who will guard the guards?
Not-So-Literal Translation: If one group is the police of the world, who will police them?

bluecafe
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Wed May 24, 2006 11:01 pm

Re: A tutorial for making a Joomla 1.5 template?

Post by bluecafe » Sat Oct 07, 2006 7:39 am

Here is another site, the text is in german though. However, if you scroll down a bit you can see the old code vs. the new code
http://www.joomlanews.de/content/view/1354/27/

first comes the old code (in German 'alt'), then the new code that replaces the old one (in German 'neu')

ghazal
Joomla! Explorer
Joomla! Explorer
Posts: 274
Joined: Fri Aug 19, 2005 12:12 pm
Location: Out of my mind ...sometimes

Re: A tutorial for making a Joomla 1.5 template?

Post by ghazal » Sat Oct 07, 2006 11:54 am

Hello,
for those of you who can read French, see the wonderful work done by several esteemed members of joomla.fr:

http://joomla15.nicolas-ogier.info/doku.php

on the templating method for Joomla1.5
I repeat : FRENCH ONLY

User avatar
sunon
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 148
Joined: Wed Sep 13, 2006 11:07 am

Re: A tutorial for making a Joomla 1.5 template?

Post by sunon » Sat Oct 07, 2006 2:00 pm

bluecafe wrote: Here is another site, the text is in german though. However, if you scroll down a bit you can see the old code vs. the new code
http://www.joomlanews.de/content/view/1354/27/

first comes the old code (in German 'alt'), then the new code that replaces the old one (in German 'neu')
Why dont you translate it with Google Translator. Go to google.com > (on the page look for...) more> (look for...) Translator > Enter exact site address > And click ok

And then get the whole thing translated for you!!!  :D

bluecafe
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Wed May 24, 2006 11:01 pm

Re: A tutorial for making a Joomla 1.5 template?

Post by bluecafe » Sat Oct 07, 2006 5:11 pm

Hi sunon,
thanks for the tip. I won't need it for the German site since german is my first language
but it will use if for trying to understand the french site ...  ;D

NealeD
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 148
Joined: Fri Sep 16, 2005 7:05 pm
Location: Gauteng
Contact:

Re: A tutorial for making a Joomla 1.5 template?

Post by NealeD » Sun Oct 15, 2006 9:48 pm

Would it be possible to provide an english version of the tutorial as?
http://www.ubulwembu.com
Joomla Support and Services

User avatar
CirTap
Joomla! Explorer
Joomla! Explorer
Posts: 418
Joined: Mon Dec 12, 2005 5:34 pm

Re: A tutorial for making a Joomla 1.5 template?

Post by CirTap » Tue Oct 17, 2006 8:53 pm

NealeD wrote: Would it be possible to provide an english version of the tutorial as?
if you're referring to the one @ jooomlanews.de, there isn't much to translate. The long text in the beginning ist just general "blurb" about template engines, when patTemplate was introduced to Mambo/Joomla, and the usual advantage of using a template engine.

In addition to what bluecafe already mentioned, "alt == old", "neu == new", there's the last example labeled with "Logische Operatoren == logical operators" (just for completeness)
The last paragraph has some news, however:
Joomlanews.de wrote: A final note about the changes made to the folder structure of templates in Joomla! 1.5. In their root directory (/templates & /administrator/templates) you'll see a new sub folder called "_system." It contains all the pages used internally by the system such as offline-, error-, and 404-pages. Designer are now able to change the appearance of these pages to their delike.
Hape this helps.

Have fun,
CirTap
Last edited by CirTap on Tue Oct 17, 2006 8:55 pm, edited 1 time in total.
You can have programs written fast, well, and cheap, but you only get to pick 2 ...

"I love deadlines. I like the whooshing sound they make as they fly by." Douglas Adams

NealeD
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 148
Joined: Fri Sep 16, 2005 7:05 pm
Location: Gauteng
Contact:

Re: A tutorial for making a Joomla 1.5 template?

Post by NealeD » Wed Oct 18, 2006 7:28 am

Thanks for the info poring.

Do you perhaps know what the new code is for "echo $mosConfig_sitename"?

Thanks
David Neale
http://www.ubulwembu.com
Joomla Support and Services

jsupriyanto
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu Oct 12, 2006 4:43 am

Re: A tutorial for making a Joomla 1.5 template?

Post by jsupriyanto » Thu Oct 19, 2006 2:00 am

NealeD wrote: Thanks for the info poring.

Do you perhaps know what the new code is for "echo $mosConfig_sitename"?

Thanks
David Neale

The new code is  echo $mainframe->getCfg('sitename');

-- Joko

bluecafe
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Wed May 24, 2006 11:01 pm

Re: A tutorial for making a Joomla 1.5 template?

Post by bluecafe » Sat Oct 21, 2006 12:11 pm

Does anybody probably know a solution for an "else" construction in pattemplate?

If I understand it right

Code: Select all

<?php
if (mosCountModules( 'right' )) ?>
<div id="right"> ...
<?php
}
?>
becomes now

Code: Select all

<jdoc:exists type="modules" condition="right" >
<div id="right"><jdoc:include type="modules" name="right" style="-3" /></div>
</jdoc:exists>
But how can I add an else condition .. i.e.

Code: Select all

<?php
if (mosCountModules( 'right' )) ?>
<div id="right"> ... </div>
<?php
}
else {?> ....
Any ideas would be highly welcome ...  :)
Last edited by bluecafe on Sat Oct 21, 2006 12:27 pm, edited 1 time in total.

User avatar
boesh
Joomla! Explorer
Joomla! Explorer
Posts: 388
Joined: Tue Aug 23, 2005 9:14 pm
Contact:

Re: A tutorial for making a Joomla 1.5 template?

Post by boesh » Sat Oct 21, 2006 12:37 pm

sorry wrong answer  :-[
Met vriendelijke groet,
- Harry -

jsupriyanto
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu Oct 12, 2006 4:43 am

Re: A tutorial for making a Joomla 1.5 template?

Post by jsupriyanto » Sat Oct 21, 2006 1:00 pm

bluecafe wrote: becomes now

Code: Select all

<jdoc:exists type="modules" condition="right" >
<div id="right"><jdoc:include type="modules" name="right" style="-3" /></div>
</jdoc:exists>
But how can I add an else condition .. i.e.

Code: Select all

<?php
if (mosCountModules( 'right' )) ?>
<div id="right"> ... </div>
<?php
}
else {?> ....
Any ideas would be highly welcome ...  :)

you can use jdoc:empty.


  your code

bluecafe
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Wed May 24, 2006 11:01 pm

Re: A tutorial for making a Joomla 1.5 template?

Post by bluecafe » Sat Oct 21, 2006 1:23 pm

Hi jsupriyanto
thanks for your suggestion. This sounds great ... however, I tried it out using the rhuk_milkway template.

I unpublished all modules on position left. Then I altered the index.php as follows

Code: Select all

<div id="leftcolumn">
<jdoc:empty type="modules" name="left" condition="0">
 <h1>test</h1>
</jdoc:empty>
</div>
Now, the word "test" should appear in the left column, right? But it's still empty ...

Am I doing anything wrong here?

jsupriyanto
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu Oct 12, 2006 4:43 am

Re: A tutorial for making a Joomla 1.5 template?

Post by jsupriyanto » Sat Oct 21, 2006 3:20 pm

Currently only "module" is supported in the jdoc:empty
See more detail in
libraries\joomla\document\html\function\Empty.php

The other thing you could do is to use JModuleHelper::getModules

bluecafe
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Wed May 24, 2006 11:01 pm

Re: A tutorial for making a Joomla 1.5 template?

Post by bluecafe » Sat Oct 21, 2006 4:23 pm

thanks, jsupriyanto ... I suppose I will have to do some reading on this :)


Locked

Return to “Joomla! 1.5 Coding”