Jump to content

Using a different .tpl file


Guest johnsimpson

Recommended Posts

Guest johnsimpson

Hi guys,

Is it possible to use a different tpl file rather that the default one?

I am creating a website where I want a different homepage to the rest of the site, which I have done so far but my problem is that the ViewProd page uses the global index.tpl file... I would rather it used the global cart.tpl as i've templated this one the way i want it and I want it to include the category navigation?

thanks

John

Link to comment
Share on other sites

Guest estelle

I'm confused, for the homepage do you want to use the global 'cart.tpl' file instead of the global 'index.tpl'?

If so, edit within: includes/global/index.inc.php

FIND this:

$body = new XTemplate ("global".CC_DS."index.tpl");




CHANGE to this:




if (empty($_GET['_a'])) {

	/* Global template for homepage */

	$body = new XTemplate ("global".CC_DS."cart.tpl");

} else {

	/* Global template for all other pages */

	$body = new XTemplate ("global".CC_DS."index.tpl");

}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...