0
votes

I'm making a custom joomla template. Everytime i try installing it from the back-end, it uploads but doesn't install. I have checked all the directory listings and stuff but can't seem to find what the problem is. Here is my templatedetails.xml

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 2.5//DTD template 1.0//EN"              "http://www.joomla.org/xml/dtd/1.6/template-install.dtd">
<extension version="2.5" type="template" client="site">
<name></name>
<creationDate></creationDate>
<author></author>
<authorEmail></authorEmail>
<authorUrl></authorUrl>
<copyright>Copyright (C)</copyright>
<version>2.0</version>
<description></description>

<files>
    <folder>css</folder>
    <folder>images</folder>
    <folder>js</folder>
    <filename>index.php</filename>
    <filename>templateDetails.xml</filename>
</files>

<positions>
    <position>message</position>
    <position>search</position>
    <position>logo</position>
    <position>menu</position>
    <position>image slider</position>
    <position>left menu</position>
    <position>right menu</position>
    <position>twitter</position>
    <position>aboutA</position>
    <position>aboutB</position>
    <position>aboutC</position>
    <position>info</position>
    <position>footer</position>
    <position>banner</position>
    <position>Small-banner</position>
    <position>facebook</position>
    <position>contact-form</position>
    <position>banner-third</position>
</positions>

</extension>

The name and details are all in the zip file.

and here's my index.php

<?php defined( '_JEXEC' ) or die( 'Restricted access' );?>

 <body>
  <div class="container">
 <div class="row">
 <h1><a href="index.html"><img src="images/logo1.png" alt="South Georgian Bay Community Health Center. Every One Matters"/></a></h1>
 </div>
<div class="row">
<section class="sixteen columns">
    <jdoc:include type="modules" name="mainmenu" style="xhtml"/>
</section>
</div>

<section class="sixteen columns">
    <div id="sliderFrame">
    <div id="slider"> 
        <img src="images/image-slider-1.jpg" alt=" " />
        <img src="images/image-slider-2.jpg" alt=" " />
        <img src="images/image-slider-3.jpg" alt=" " />
        <img src="images/image-slider-4.jpg" alt=" " />
        <img src="images/image-slider-5.jpg" alt=" "/>
 <jdoc:include type="modules" name="slideshow" style="xhtml"/>
    </div>
    </div>
    </section>

</div>
<div class="row">
<section="sixteen columns"><p></p></section>
<section="seven columns"><p></p></section>
</div>
<div class="row">
<section class="twelve columns">
        <jdoc:include type="message" /> 

        <jdoc:include type="component" style="xhtml"/>
    </section>
    <section class="four columns ">
         <jdoc:include type="modules" name="twitter" style="xhtml"/>
    </section>
</div>

<div class="row">
<section class="five columns">
<jdoc:include type="modules" name="aboutA" style="xhtml"/>
</section>

<section class="five columns">
<jdoc:include type="modules" name="aboutB" style="xhtml"/>
</section>

<section class="five columns">
<jdoc:include type="modules" name="aboutC" style="xhtml"/>
</section>

</div>
<div class="row">
<section class="sixteen columns">
<jdoc:include type="modules" name="footer" style="xhtml"/>
</section>
</div>
</div>

it isn't showing my head section properly for some reason. I am using a grid for the layout. Could anyone help me out because i've been trying for a while now and can't find a way around.

2
The installation process should be driven entirely around the xml file. Since it sounds like you aren't getting any errors, I would start by updating the top of the xml document with at least a name (typically the same name as the folder you want the template in). I don't think it will work without a name. - David Fritsch
And make it a name with no spaces. - Elin

2 Answers

1
votes

Please validate your xml.

Change:

section="sixteen columns"  

to

section class="sixteen columns"...
0
votes

regardless if you are using a grid framework or not it always comes down to the URL or href= to you linking to your stylesheets and images directly within the index.php file. This just happened to me 5 minutes ago and it happens to me all the time and I never turn around and look at the big picture.

First of all I don't know why but I think for some odd reason you should or must include a <filename>index.html</filename> blank file.

next

you also need a favicon.ico in your templatedetails and an actual favicon.ico in your root of the template. I do believe this is mandatory or breaks a template or causes an upload directly from install under joomla to malfunction!

The problem that I had is even though my stylesheets seem to be getting called, they really are not being called so what I did and what I will always do in the future when building joomla templates is to replace this in all my references to files in the head or elsewhere.

Lets say you have href="css/bootstrap.min.css" or something. add this

<?php echo $this->baseurl ?>
/templates/
<?php echo $this->template ?>/

to make it

href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/bootstrap.min.css"

if nothing else worked this will and it's a good practice too.

you also cannot! Cannot forget this towards the beginning of your tag <jdoc:include type="head" />

You didn't show all your index.php so I could not tell..