Talk:Creating a basic Joomla! template
(→Is doctype "transitional" really neccessary within joomla templates?)
|Line 49:||Line 49:|
== $this->baseurl ==
== $this->baseurl ==
Revision as of 12:30, 1 September 2009
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?
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. -- 10:23, 2 June 2008 (EDT)
How to 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??
How to 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??
(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
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" />
Is doctype "transitional" really neccessary within joomla templates?
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
You can use whatever DocType you like in your template. However, bear in mind that all your components and modules will also need to be Strict-compliant if you use Strict in your template. You should only use Strict if you can guarantee that that will happen. This includes "user-generated" content, so you need to be certain that the WYSIWYG editor is also outputting Strict code too. It is for that reason that the core templates are set to the more conservative Transitional. Chris Davenport 17:30, 1 September 2009 (UTC)
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)