Joomla Template not installing properly - templates

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><img src="images/logo1.png" alt="South Georgian Bay Community Health Center. Every One Matters"/></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.

Please validate your xml.
Change:
section="sixteen columns"
to
section class="sixteen columns"...

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..

Related

Why Prestashop's checkout template doesn't extend page.tpl?

In prestashop 1.7, the checkout template file themes/classic/templates/checkout/checkout.tpl uses its own html structure instead of extending page.tpl, like every other checkout pages (cart, order confirmation, etc).
Why is that? Is there any security flaw we should be aware of?
I've overriden checkout.tpl in my own theme {extends file='page.tpl'} and I want to make sure that everything's alright:
{extends file='page.tpl'}
{block name='content'}
<section id="content">
<div class="row">
<div class="col-md-8">
{block name='cart_summary'}
{render file='checkout/checkout-process.tpl' ui=$checkout_process}
{/block}
</div>
<div class="col-md-4">
{block name='cart_summary'}
{include file='checkout/_partials/cart-summary.tpl' cart = $cart}
{/block}
{hook h='displayReassurance'}
</div>
</div>
</section>
{/block}
Thanks!
Florian

joomla condition position module for content

i create new template for j2.5,
i need to add many module only show on home,
now i need to show many module all page without home,
pleas see my code below :
<div class="row" style="margin-top:20px;">
<div class="col-xs-12 co-md-12">
<?php if($this->countModules('adsright')) : ?>
<div class="col-xs-12 col-md-2">
<jdoc:include type="modules" name="adsright" style="custom" />
</div>
<?php endif; ?>
<div class="col-xs-12 col-md-10">
<div class="content">
<jdoc:include type="message" />
<jdoc:include type="component" /> </div></div>
</div>
</div>
when add module to adsright position and unchecked home page,was not show on my content,
how can i solve that ?
please tell me full way for create position conditional.
thanks.
please give some clear description of your problem.
And if you want certain positions and div structure on home page and not require same on inner pages then you can set condition based on this code. I hope this will help.
$app = JFactory::getApplication();
$menu = $app->getMenu();
if ($menu->getActive() == $menu->getDefault()) {
echo 'Home page';
}

Nested floats do not work in CFDOCUMENT css

The below html was provided inside a <cfdocumentitem type="header"> block.
But the output is empty.
<div class="grid">
<div class="span5">
<div class="span5">
Label1
</div>
<div class="span5">
Data1
</div>
</div>
<div class="span5">
<div class="span5">
Label2
</div>
<div class="span5">
Data2
</div>
</div>
<div style="clear:both"></div>
</div>
But when I remove the nested 'class="span5"' divs and put some content there, it is working fine. Is there any problem with nested float in cfdocument???
Unfortunately, CSS support in CFDOCUMENT is kind of hit or miss.
2 rules to follow that might help:
Make sure your HTML validates as XHTML 1.0 Transitional
Import your style sheets using
<style type="text/css" media="screen">#import "style.css";</style>
This same information can be found here: http://rip747.wordpress.com/2007/09/10/cfdocument-it-works-if-you-know-how/

Jquery Cycle 2 double pager

I have two jQuery Cycles Version 2. http://jquery.malsup.com/cycle2/
I want to have one navigation (#nav) to control both of the cycles. I know it is still BETA, so maybe it isn't possible yet..
<script src="http://jquery.malsup.com/cycle2/jquery.cycle2.js"></script>
<script src="http://jquery.malsup.com/cycle2/jquery.cycle2.scrollVert.js"></script>
<div class="cycle-slideshow"
data-cycle-fx="scrollVert"
data-cycle-pause-on-hover="true"
data-cycle-timeout="0"
data-cycle-pager="#nav">
<img src="http://i46.tinypic.com/29oocgm.jpg" data-cycle-pager-template="<a href=#>1</a>" />
<img src="http://i48.tinypic.com/o602sz.jpg" data-cycle-pager-template="<a href=#>2</a>" />
<img src="http://i50.tinypic.com/qntoxc.jpg" data-cycle-pager-template="<a href=#>3</a>" />
</div>
​<br />
<br />
<div class="cycle-slideshow"
data-cycle-fx="scrollVert"
data-cycle-pause-on-hover="true"
data-cycle-timeout="0"
data-cycle-pager="#nav">
<img src="http://i46.tinypic.com/29oocgm.jpg" data-cycle-pager-template="<a href=#>1</a>" />
<img src="http://i48.tinypic.com/o602sz.jpg" data-cycle-pager-template="<a href=#>2</a>" />
<img src="http://i50.tinypic.com/qntoxc.jpg" data-cycle-pager-template="<a href=#>3</a>" />
</div>
<div id="nav"></div>​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​
Example: http://jsfiddle.net/hfjXd/
Iøm not sure I understand exctly what you mean but if you just use:
data-cycle-prev=".prev"
data-cycle-next=".next"
on both of the Cycles it should just do it.
check this example: view-source:http://jquery.malsup.com/cycle2/demo/caro-pager.php
and this one: http://jquery.malsup.com/cycle2/demo/prevnext.php

Joomla 2.5 - Is it possibile to load system messages inside jdoc content?

I have the following code:
<div id="content">
<?php if(count($app->getMessageQueue())) { ?>
<jdoc:include type="message" />
<?php } ?>
<jdoc:include type="component" />
</div><!--#content-->
Everything works fine expect when there are error or system generated messages. When they are presented output looks like:
<div id="content">
Some error messages
<h1>Some page title</h1>
<p>Some content</p>
</div><!--#content-->
I want to they looks like:
<div id="content">
<h1>Some page title</h1>
Some error messages
<p>Some content</p>
</div><!--#content-->
So error messages should be below h1 tag and before p tag. How to achieve that without hacking core files?
If am not wrong, just swap the two lines (1st as component and 2nd as message).
<div id="content">
<jdoc:include type="component" />
<?php if(count($app->getMessageQueue())) { ?>
<jdoc:include type="message" />
<?php } ?>
</div><!--#content-->