Jump to content

index and landing pages - different layouts


Guest traci

Recommended Posts

  • 1 month later...

There is a free mod at cubecartforums.org called Unique Home Page.

ACK! where did cubecartforums.org go ?!?! hopefully they will be back soon! if not can anyone post the tut here ? and is it the same process "exactly" as it was in V3? oh and one more thing.. how can i integrate the date onto the template ...

Link to comment
Share on other sites

sooooo if i replace

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




with 


	

if(isset($_GET['act'])) {

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

	} else {

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

	}

it just defaults to the else statement and shows home.tpl no matter what ... what do i need to do to get this to switch between the two to have a unique home page template...

any suggestions?

Link to comment
Share on other sites

  • 3 weeks later...
Guest horizens

Figured this out for CC4:

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

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

} else {

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

		

}

Link to comment
Share on other sites

  • 4 weeks later...

I am definitely losing my mind... I have been over this thread and the cubecartforums.org and can't find these lines that everyone else seems to have! My root index.php page is below. I would like to have a different homepage but it seems almost impossible... Somebody help me please??? I think I've had too much code on the brain...

$debugStart = microtime();



if ($_GET['_a'] == 'search') {

	# Do nothing

} else {

	preg_match('#([a-z]{1,4})_([0-9]+)\.?([a-z]+)?$#i', $_SERVER['REQUEST_URI'], $matches);

	switch($matches[1]) {

		case 'c':

		case 'cat':

			$_GET['_a'] = 'viewCat';

			$_GET['catId'] = $matches[2];

			break;

		case 'i':

		case 'info':

			$_GET['_a'] = 'viewDoc';

			$_GET['docId'] = $matches[2];

			break;

		case 'p':

		case 'prod':

			$_GET['_a'] = 'viewProd';

			$_GET['productId'] = $matches[2];

			break;

		case 't':

		case 'taf':

		case 'tell':

			$_GET['_a'] = 'tellafriend';

			$_GET['productId'] = $matches[2];

			break;

	}

}



require_once 'ini.inc.php';



## If global.inc.php doesn't exist, the store probably needs to be installed

if (!file_exists('includes'.CC_DS.'global.inc.php')) {

	header('Location: setup/index.php');

	exit;

}

require_once 'includes'.CC_DS.'global.inc.php';



## If it does exist, then check that the install worked, and that the admin file exists

if (!$glob['installed'] || !isset($glob['adminFile'])) {

	# Nope, lets do the install

	header('Location: setup/index.php');

	exit;

}



## Let's load the encoded script, based on what encoders are available

if ($glob['encoder'] == 'zend') {

	## Zend Optimizer

	require_once 'index_enc_zend.php';

} else {

	## IonCube Loader

	require_once 'index_enc_ion.php';

}

?>

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