Talk

Creating a basic Joomla! template

From Joomla! Documentation

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

OK, something has gone wrong here. I edited the "creating an index.php file" and it went wrong - renamed itself 404.shtml. It refused to allow editing of the "creating" file so I tried making a new one "create". Now I can't access either to edit them.

Yeah, okay, I know why this is happening. There is a mod_rewrite rule that looks for "index.php" and rewrites the URL in its SEF form. This fails if "index.php" appears as part of the page name and so you get redirected to 404.shtml which is MediaWiki's "page not found" page. I think the quick and easy fix is to simply avoid having "index.php" in page names. Chris Davenport 10:29, 2 May 2008 (EDT)

A bit of craziness?[edit]

What's happening toward the bottom of this page after "Finish it off - one last bit:"? It seems like a bunch of code might have gotten accidentally pasted or something. Corsulian 14:36, 1 June 2008 (EDT)

That bunch of code is the full template source explained in this tutorial and was included from another page but not wrapped in a PRE element to preserve the white space. I fixed all affected pages. --CirTap (talkcontribs) 10:23, 2 June 2008 (EDT)

How to edit[edit]

I was going to make a basic proof reading change to the text, but all the edit screens do not show any text, only the headings between wouble curly brackets. Is this because I am new, or because I am not too swift??

Dave

How to edit[edit]

I was going to make a basic proof reading change to the text, but all the edit screens do not show any text, only the headings between double curly brackets. Is this because I am new, or because I am not too swift??

Dave

(sorry for the double post - veeerrry slow browser!)

It's because you're new. ;-) The titles in double curly brackets are links to "transcluded" pages; that is, other wiki pages that are being embedded in the page. If you scroll to the bottom of the edit page you will see a list of the transcluded pages (they're called "templates" in wiki parlance; not to be confused with Joomla templates of course). If you click on one of those links you will be taken to the page with the text on it. From there you can click "Edit" and make your changes. For more information about using the wiki see: Help:Contents. Chris Davenport 12:31, 21 August 2008 (EDT)

Thanks Chris - thought it was something like that.

index.php header stylesheet[edit]

I'm new to Joomla! and still trying to get my head around the templates. Thanks to the author(s) so far on a clear and concise tutorial on a basic template.

I was just wondering if the following:

<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/mynewtemplate/css/style.css" type="text/css" />


would not be better served as:

<link rel="stylesheet" href="<?php echo $this->baseurl ?>templates/<?php echo $this->template ?>/css/style.css" type="text/css" />


Regards Pierre

Is doctype "transitional" really neccessary within joomla templates?[edit]

Layout of modern templates usually try to use stricter definitions like "-//W3C//DTD HTML 4.01//EN" or even "-//W3C//DTD XHTML 1.1//EN". I would prefer it, if developers try to succeed with these w3c recommendations.

This is a user question, because i don't know the dependencies on joomla code

regards gorgonz

$this->baseurl[edit]

Why is $this->baseurl used when it is invalid and doesn't work in the context of index.php template files? From my understanding it should be JURI::root(). If you try and use $this->baseurl in an index.php template file, you will find that nothing happens. --Vcardillo 17:24, 1 September 2009 (UTC)