Drupal: .htaccess Access Deny
August 21, 2014 – 7:59 am | No Comment

In this article I will tell how to forbid access to certain resources for some clients. The instructions will include descriptions of different directives.

Read the full story »
CSS Templates

Contain reviews and news about CSS Templates.

Freebies

Contain freebies such as icons, graphics, headers and images for your websites.

Fun Stuff

Contains other fun stuff for entertainment or interesting site showcase.

How-To

Contain technical elaborations on some specific workarounds or common tweak.

Joomla Templates

Contains reviews and news about Joomla templates.

Home » How-To, Joomla Templates

How to Create Template and Assign Different Templates for Pages

Submitted by on September 21, 2009 – 8:57 amNo Comment
joomla-logo-150x137

Standard Joomla set includes several templates which are located within ../template folder in the root of your site. You can use any of them (except /system).

You can easy create a new template:

  1. Create a new folder within ../template folder;
  2. Add to this folder templatedetails.xml and index.php files

Templatedetailes.xml file is a description of a new template. It contains two required sections. The first one includes general information about your template such as name, date of creation, information about template author, etc.:

<?xml version="1.0" encoding="utf-8" ?>

<!DOCTYPE install (View Source for full doctype…)>

- <install version="x.x" type="template" client="site">

<name>TemplateName</name>

<creationDate>MM/DD/YY</creationDate>

<author>AuthorName</author>

<authorEmail>author@email.com </authorEmail>

<authorUrl>http://www.authorUrl.com</authorUrl>

<copyright />

<license>GNU/GPL</license>

<version>x.x.x</version>

<description>description</description>

The second one describes position of modules on the page, for example:

- <positions>

<position>breadcrumb</position>

<position>left</position>

<position>right</position>

<position>top</position>

<position>user1</position>

<position>user2</position>

<position>user3</position>

<position>user4</position>

<position>footer</position>

<position>debug</position>

<position>syndicate</position>

</positions>

If you have any problems with creating this file, you can always apply to templatedetails.xml of any existing Joomla template.

This would be the simplest template. For more difficult template you will need to create folders with css, javascripts, images and html pages.

Index.php is a file with standard html page layout. If you wish to insert some Joomla module into your template, paste the following string to index.php:

<jdoc:include type="modules" name="modulename" style="rounded" />

where modulename is a name of the module to be inserted.

Settings default template for site

Now let select the default template for your site:

  1. Go to Extensions -> Template Manager;
  2. Select a template from the list and click Default button at the top of the page.

The selected template will be immediately starred in the Default column of the list. From now, your site will use this template for pages appearance.

Assigning another template for individual site page(s)

While you have already set the default template for your site, you may wish to show some page in other manner. Joomla allows you to do so assigning some other template for individual page(s):

  1. Go to Extensions -> Template Manager;
  2. Click to the name of a template which will be assigned to a page;
  3. Within Menu Assignment area, select page (or pages) the template will be assigned to.
  4. Click Save.

The assigned template will be marked with check in Assigned column of the templates list. And the selected page(s) will be displayed using the assigned template.

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.