I'm beginning to create a website in Joomla 1.6. The web site will mainly have two designs. One for that home page and also the other is for the other sub-pages.

The issue: I'm attempting to put both designs in a single template (or folder).

I've come across this done before using a conditional statement using the JURI:current() function, however for some odd reason, it's not working correctly for me personally.

Here's some fundamental psuedocode to point things i am attempting to do...

<?php 

$HomePagePath = 'Homepage URL here...';
echo JURI::current(); // Just to test what the current output is going to be.
?>

<?php if(JURI::current() == $HomePagePath ): ?>

Template for homepage here

<? else; ?>

Template for sub-pages here

<? endif; ?>

After I test things i am building with this particular code, it's not working correctly. I've made certain several occasions the output in the current JURI matches the present URL within the browser. It's showing me the sub-page content as opposed to the home page content... I don't know what's leading to this :/ ...

I'm presently running this site with no real domain behind it. I'm while using GoDaddy Preview DNS feature for the moment... This feature essentially provides me with a brief domain until I point the right one. I don't determine if this might have something related to the present JURI not parsing correctly? This is actually the only factor I'm able to think about that might be leading to this...

I suppose my next real question is... are you aware permanently, apart from the present() function, which will accomplish things i am attempting to do?

Thanks!

Chris

You should use template Styles to aid in this method.

You are able to duplicate styles, and alter reasons for the design and style - but each style uses exactly the same 'template'.

I have performed around by using it a little and i believe it's most likely pretty near to precisely what you are searching to complete - unless of course you desired a totally separate search for the second template by which situation using 2 templates will most likely function as the 'best bet'.

I'd recommend considering template styles though - basically you might have as numerous 'styles' from the template as you would like, but things are based from that certain 'template', it's just the style that's altering. You are able to get into your menu products and choose that style in the dropdown for templates. Hopefully helps you to seem sensible, since it seems like precisely what you are searching for.

Also, I'd recommend following a upgrade to at least one.7 before getting too much along in development. For both security reasons, and also to make certain your template products work easily with 1.7 (they are pretty similar, but I have had some templates that did not benefit from the jump from 1.6 -> 1.7).

*edit: this is a little info on it: Joomla Styles