Joomla template folder not showing in template manager - joomla

I am trying to create a template.I have created a folder for template in templates folder and also created two files index.php and templateDetails.xml
My index.php has following code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<jdoc:include type="head" />
</head>
<body>
<jdoc:include type="component" />
</body>
</html>
and templateDetails.xml has following code which yes I copied because beginner.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 1.5//DTD template 1.0//EN"
"http://dev.joomla.org/xml/1.5/template-install.dtd">
<install version="3.1.5" type="template">
<name>template _tut</name>
<creationDate>31-01-2009</creationDate>
<author>Nettut Fan</author>
<authorEmail>your#email.com</authorEmail>
<authorUrl>http://www.siteurl.com</authorUrl>
<copyright>You 2009</copyright>
<license>GNU/GPL</license>
<version>1.0.0</version>
<description>Template Tut</description>
<files>
<filename>index.php</filename>
<filename>templateDetails.xml</filename>
<filename>css/template.css</filename>
</files>
<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>
</positions>
</install>
My joomla version is 3.1.5 and despite doing above mentioned steps my template folder is not showing in template manager.

You need to install the template to register it completely.
There are 2 ways of doing this:
Download your files, zip them up and install it as you would any other extension.
In the Joomla backend, go to "Extension Manager", then "Discover". This will detect uninstalled extensions and should bring your template up in the list. check it and install it
Hope this helps

Related

why is default_head_blocks.xml not removing the css files?

I have put 2 remove tags inside default_head_blocks.xml:
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<remove src="css/print.css"/>
<remove src="css/styles-m.css"/>
</head>
</page>
The file is under app/design/frontend/<theme>/Magento_Theme/layout/
But the css files are not being removed. Should I put the file in a different directory?
Directory is correct. can you please try to flush cache and check again.

Cannot load primefaces default theme when I have additional folder in the URL

Here is the POM file
<dependency>
<groupId>org.primefaces.extensions</groupId>
<artifactId>all-themes</artifactId>
Web.xml
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>aristo</param-value>
On the main page http://localhost/helloworld/search.faces primefacs theme loads fine
Generated Page with primefaces style sheet is
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml"><head><link type="text/css" rel="stylesheet" href="/helloworld/javax.faces.resource/theme.css.faces?ln=primefaces-aristo" /><link rel="stylesheet" media="screen" type="text/css" href="/helloworld/javax.faces.resource/primefaces.css.faces?ln=primefaces&v=5.0" /><script type="text/javascript" src="/helloworld/javax.faces.resource/jquery/jquery.js.faces?ln=primefaces&v=5.0"><!--
//--></script><script type="text/javascript" src="/helloworld/javax.faces.resource/primefaces.js.faces?ln=primefaces&v=5.0"><!--
//--></script><script type="text/javascript" src="/helloworld/javax.faces.resource/jquery/jquery-plugins.js.faces?ln=primefaces&v=5.0"><!--
//--></script>
but when I access subsequent pages which is one folder down
http://localhost/helloworld/app/welcome.faces, theme is not applied. Url generated for the theme file is adding the extra folder which is in the url and thus not able to find the theme file resulting in theme not getting loaded. What should I do for the extra folder to not get added to the for the primefaces theme url...
generated page is
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml"><head><link type="text/css" rel="stylesheet" href="/helloworld/app/javax.faces.resource/theme.css?ln=primefaces-aristo" /><link rel="stylesheet" media="screen" type="text/css" href="/helloworld/app/javax.faces.resource/primefaces.css?ln=primefaces&v=5.0" /><script type="text/javascript" src="/helloworld/app/javax.faces.resource/jquery/jquery.js?ln=primefaces&v=5.0"><!--
//--></script><script type="text/javascript" src="/helloworld/app/javax.faces.resource/jquery/jquery-plugins.js?ln=primefaces&v=5.0"><!--
//--></script><script type="text/javascript" src="/helloworld/app/javax.faces.resource/primefaces.js?ln=primefaces&v=5.0"><!--
//--></script>
code
There is no theme related code in xhtml... mentioned in web.xml and all- themes in POM file.
welcome.xhtml and search.xhtml are the same and here is the snippet
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
template="/WEB-INF/layouts/standard.xhtml">
<ui:define name="title">
</ui:define>
standard.xhtml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<f:view contentType="text/html">....
Summary of the problem
If the url is /helloworld/search.faces generated in the page is /helloworld/javax.faces.resource/primefaces.js.faces?ln=primefaces&v=5.0" ... and theme loads fine.
When the url is ( is one folder deep) theme does not load /helloworld/app/welcome.faces path generated is in the page is href="/helloworld/app/javax.faces.resource/theme.css?ln=primefaces-aristo ... see the app directory that is added.... This is causing 404 erros for this resouce as it is not able to find it.
Is there a way to control the generated primefaces theme path ?
Upon further digging thro the rest of the config files. Added the following line to servlet context.
<!-- Enable processing of JSF 2 resource requests. For example: /webflow-primefaces-showcase/app/javax.faces.resource/jsf.js?ln=javax.faces -->
<faces:resources />
and now the theme is getting applied without any issues. Thanks for all those who chimed in.

After JUpdate my content position is gone from list - joomla

I used JUpdate to update a joomla 1.5.23 site to 2.5
when i tried to re-link the content area to the article i cant find the position from my main content area in the menu anymore.
the left sidebar is still there and also the right one.
Can anyone shine some light on this? i already tried all the positions from the template twice but i cant seem to find it?
--- template details ---
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 1.6//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>
<version>1.0.0</version>
<creationDate>07/2009</creationDate>
<author>SiteGround</author>
<authorEmail></authorEmail>
<authorUrl></authorUrl>
<copyright></copyright>
<license>GNU/GPL</license>
<description>TEMPLATE_DESCRIPTION</description>
<files>
<filename>index.php</filename>
<filename>templateDetails.xml</filename>
<filename>template_thumbnail.png</filename>
<filename>templates.php</filename>
<filename>template_preview.png</filename>
<filename>error.php</filename>
<folder>css</folder>
<folder>images</folder>
</files>
<positions>
<position>user4</position>
<position>user3</position>
<position>breadcrumb</position>
<position>user2</position>
<position>left</position>
<position>right</position>
<position>debug</position>
</positions>
<languages>
<language tag="en-GB">en-GB.tpl_siteground-j15-80.ini</language>
</languages>
<administration>
<languages folder="admin">
<language tag="en-GB">en-GB.tpl_siteground-j15-80.ini</language>
</languages>
</administration>
</extension>
I'm not too sure why you used JUpdate to update to 2.5. I personally don't always trust 3rd party extensions to update the CMS as it sometimes causes problems. What you should do is (providing you have a backup of your old 1.6 site):
Upgrade to 1.6.6 by downloading the patch and extracting it via FTP on to the root of your site
IN the Joomla Backend, go to Extensions >> Extension Manager >> Find Updates
If you can't find any updates, then go to Options and select the Long Term Release. Once saved, Purge Cache and try to find updates again.
Update:
change this:
<?php if($this->params->get('showComponent')) : ?>
<jdoc:include type="component" />
<?php endif; ?>
to this:
<jdoc:include type="component" />
So basically remove the PHP that is wrapped around

Tiles 2.2 put-list-attribute + Spring 3.1.4

I am migrating our application from struts 1.3 to spring 3.1.4 mvc. In the process i am also upgrading from tiles 1.1 to tiles 2.2. Jstl version is 1.1. With Tiles 2.2, i am having an issue about using put-list-attribute. I am trying to show a simple jsp page which should does following:
a) Header : include bunch of css (i commented it out as it doesn't work. Using firebug i see error "NetworkError: 404 Not Found - http://localhost:8080/appname/%BeachStyle%7d" --- {eachStyle}
No idea where %BeachStyle% came from.
b) Header : include title -- Works fine
c) body : show static text
tiles.xml
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
"http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
<tiles-definitions>
<definition name=".login" preparer="com.tiles.LoginController"
template="/tiles/layouts/layoutmain.jsp">
<put-attribute name="pageTitle" value="vivi test" />
<put-list-attribute name="baseStylesTest">
<add-attribute value="/styles/css/grids.css"/>
<add-attribute value="/styles/css/superfish.css"/>
<add-attribute value="/styles/css/styles.css"/>
</put-list-attribute>
</definition>
</tiles-definitions>
layoutmain.jsp
<%# taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<%# taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%# taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<tiles:useAttribute id="stylesList" name="baseStylesTest" classname="java.util.List"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%-- <c:forEach var="eachStyle" items="${baseStylesTest}">
<link type="text/css" rel="stylesheet" href="<c:out value='${eachStyle}'/>" /> --%>
<title><tiles:insertAttribute name="pageTitle" /> </title>
</head>
<body>
Login page body
</body>
</html>
I tried the following:
i) Checked the tiles2.2 dtd and example to use it - found similar usage
ii) Checked examples over internet and how it's being used - found similar usage
iii) Checked how its used with struts -- found they use #attr.xxx as it is in pagescope
I don't see anything wrong in my implementation. The title attribute is rendered properly but on the attribute belonging to put-list-attribute.
Any help is much appreciated.
Found the solution. JSTL wasn't working as i declared my web-app version to be 2.5. This is not compatible with tomcat5.5 which i was using. Changed the web-app version to be 2.4 and all is good.
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
---
</web-app>

dont show modules

I am doing a joomla 2.5 project
I put this <jdoc:include type="modules" name="izquierdo" style="none"/> and it shows me nothing.
The positions in my template is this:
<positions>
<position>izquierdo</position>
<position>extranet</position>
<position>menuPrincipal</position>
The status of this module is public.
Any ideas, am I miss something?
I found something strange.
if I put my route and at the end add ?tp=1 it shows me all my postions and it shows me my module (I see the image and other thinks), but with the normal router (without ?tp=1) I don't see anything.
This is my xml template:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 1.6//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>arquero</name>
<creationDate>10/10/09</creationDate>
<author>Ron Severdia</author>
<authorEmail>mpiedra#edosoftfactory.com</authorEmail>
<authorUrl>http://www.kontentdesign.com</authorUrl>
<copyright>Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>2.5.0</version>
<description>ARQUERO_XML_DESCRIPTION</description>
<files>
<folder>html</folder>
<folder>css</folder>
<folder>images</folder>
<folder>js</folder>
<filename>index.php</filename>
<filename>index.html</filename>
<filename>templateDetails.xml</filename>
<filename>ajax.php</filename>
<filename>component.php</filename>
</files>
<positions>
<position>izquierdo</position>
<position>extranet</position>
<position>menuPrincipal</position>
<position>carrusel</position>
<position>noticias</position>
<position>footer</position>
<position>debug</position>
</positions>
</extension>
It seems to be fine your template. But try style="xhtml" on your jdoc statement.
And another guess is please check again the assignment of pages for your module from the backend. Most probably you might select "No pages" for the module assignment.
Thank you.

Resources