At elxis.net for example the template displays no columns on component EDC pages (the left column shown is from the component, not the template) but it does show a right column in rest pages, like the search page.
$segments = eFactory::getURI()->getSegments();$c = count($segments);$cssfile = 'style1.css';if ($c > 0) { switch (segments[0]) { case 'category1': $cssfile = 'style2.css'; break; case 'category2': 'category4': $cssfile = 'style3.css'; break; case 'user': 'mygallery.html': $cssfile = 'style4.css'; break; default: break; }}$link = eFactory::getElxis()->secureBase().'/templates/mytemplate/css/'.$cssfile;eFactory::getDocument()->addStyleLink($link);
$component = eFactory::getURI()->getComponent();$layout = '2columns.php';switch ($component) { case 'user': $layout = '3columns.php'; break; case 'search': 'something': $layout = 'nocolumns.php'; break; default: break;}include(ELXIS_PATH.'/templates/mytemplate/'.$layout);
segments[0]
case 'user': $layout = '3columns.php'; break; case 'search': 'something': $layout = 'nocolumns.php'; break;
elxisLoader::loadFile('templates/unique/'.$tps2);
<?php $eDoc->modules('language', 'none'); ?>
<?php $eDoc->modules('left'); ?>
[:head:] [:replmark2:] [:replmark3:]
Dont use the elxisLoader to include the template's file, elxisLoader is for PHP libraries. If you do so you have to work different on these files. Use php's standard include function:include(ELXIS_PATH.'/templates/unique/'.$tps2);Everything else is fine, go on!
<?phpdefined('_ELXIS_') or die ('Direct access to this location is not allowed');// get the Elxis libraries we are going to use$eLang = eFactory::getLang();$eDoc = eFactory::getDocument();$elxis = eFactory::getElxis();$tplbase = $elxis->secureBase().'/templates/unique';elxisloader::loadFile('templates/unique/includes/unique.class.php');$unique = new templateUnique();// display the document type before the html tag.echo $eDoc->getDocType()."\n";?>
<?php include('header.php'); ?>