Elxis CMS Forum

Extensions => Templates => Topic started by: pcfun on November 11, 2006, 17:28:57

Title: Template construction
Post by: pcfun on November 11, 2006, 17:28:57
I know that i ask something difficult, but is there anybody who could explain me in a few easy steps how to build a template. I found an adress that shows the basic steps to create a template, though it shows the way to create a very simple template without any graphic. I would like you to explain me how i add these graphics in it.
To be more clear. I understood that firstly we make the layout of the template in Macromedia Dreamweaver 8 and then we make the css file and the template details file. Though i don't know how to add the images, that i have made in photoshop for example, in my page, so that it looks nice.
Thanks for your time!!!
Title: Re: Template construction
Post by: eliasan on November 12, 2006, 10:19:57
Hi and welcome.

Designing a simple template is easy.

A template consists from:
index.php. Contains the layout information and defines the module positions.
css/template_css.css. A CSS file containing the CSS class definitions used in your template
images/*.*. Images used in the template are stored in a separate subflder named "images".
templateDetails.xml. An XML file that contains instructions and info about the template.
template_thumbnail.png. A screenshot of the template.

To add an image in your template, use an HTML tag like the following example.

<img src="<?php echo $mosConfig_live_site; ?>/templates/testtemplate/images/logo.jpg" alt="">

During execution, <?php echo $mosConfig_live_site; ?>, is replaced with site's URL, e.g. https://www.elxis.org.
testtemplate is the same as the name of the template.

So, if you view the source code of your site, the above line of code would be:
<img src="https://www.elxis.org/templates/testtemplate/images/logo.jpg" alt="">


Title: Re: Template construction
Post by: hwell on May 04, 2007, 11:40:23
What was that site, about creating templates for Elxis CMS?
Thanx
Title: Re: Template construction
Post by: Ivan Trebješanin on May 04, 2007, 12:39:57
@pcfun

If you wish, I will post a detailed tutorial, but there are so many tutorials around for making joomla templates, and they are valid for elxis templates too.... Anyway, if you're not experienced user, you might get confused with default published module positions in elxis, as they are slightly different in elxis then in mambo/joomla.

As I said, if you can't figure it out, I can sit down and write one tutorial later today.
Title: Re: Template construction
Post by: Ivan Trebješanin on May 05, 2007, 22:00:55
@pcfun

Sorry, I was busy yesterday, but I've created one template for you... There are comments throughout the CSS, so you can modify what you want. Also, in addition to this template, you might want to read my tutorial, that explanes this template http://www.jazzign.com/index.php?option=com_content&task=view&id=12&Itemid=10

(http://elxis.jazzign.com/e_srbija.png)

[old attachment deleted by admin]
Title: Re: Template construction
Post by: Ivan Trebješanin on May 06, 2007, 01:46:15
Regarding the above template... just a fix for IE6 of course... you need to add the following line in CSS:
find .content{some code} and add height:100% before closing bracket (looks like this }). I have updated the template, so I say this just in case that the above line don't exist in yous CSS.