It is currently Sat Jul 04, 2009 3:06 am (All times are UTC )

 


Forum rules

Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.



Post new topic Reply to topic  [ 14 posts ] 
Author Message
Posted: Tue Oct 11, 2005 12:30 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Mon Oct 10, 2005 7:09 am
Posts: 210
Location: Payyannur, Kannur, Kerala,India
hi,

I have two templates one for home page and another for rest of the pages. Now on load the rollover menu and default home page templates are loaded.its rough placeholders image is attached for providing a better picture.

Can clicking on the menu link here in home page load another template and the the site based on the new template. I am really struck up with this.

I request your help and consideration and thanking you in advance for your concern shown,

Harish



Or Is it possible to load based on some conditions like wise so that I could make the image the default load and and on click load the mosmainbody.Really afraid of being stuck with this for so long and praying for members and experts of a solution.

Harish


You do not have the required permissions to view the files attached to this post.

_________________
Technology to Solutions ( Skype : holy.geek_saffrongeek )
Given enough eyeballs , All bugs are shallow.
Collecting data is only the first step toward wisdom. But sharing data is the first step toward community


Top
   
 
Posted: Tue Oct 11, 2005 2:52 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Aug 18, 2005 4:35 pm
Posts: 2836
Location: Cheshire, England
In the template manager you can set the DEFAULT template for the site and ASSIGN a second template just for the home page.

OR if you only need to make a small change to the template e.g. to include an image you can use just 1 template with a conditional statement in php such as:

Code:
<?php if ($option=="com_frontpage") {
            ?>
            <div> here we can add some html </div>
            <?php
        } ?>


This php checks to see if the frontpage is being viewed and if so will include some extra html. You could use other statements such as an IF ... ELSE statement to change the template output.

_________________
Look at the page source... Lots of useful info...


Top
   
 
Posted: Tue Oct 11, 2005 6:38 pm 
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sun Oct 09, 2005 3:57 pm
Posts: 392
Thanks for that info! I knew how to do it from the template manager, but was unaware you could do it from source!

_________________
-Josh Fee, JAF Site Design

View the website as it is created (using Joomla! of course)http://www.jafsitedesign.com


Top
   
 
Posted: Wed Oct 12, 2005 5:49 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Mon Oct 10, 2005 7:09 am
Posts: 210
Location: Payyannur, Kannur, Kerala,India
hi bro,

                    /**************************************************/
                    /*            Wishing you Happy Navarathri                              */
                    /**************************************************/

      Thanks for that pointer.

      I believe I can use it and would definitely pop up with the outcome. Thanking you for the concern shown and consideration

Harish Balakrishnan Marar 


     

 


toubkal wrote:
In the template manager you can set the DEFAULT template for the site and ASSIGN a second template just for the home page.

OR if you only need to make a small change to the template e.g. to include an image you can use just 1 template with a conditional statement in php such as:

Code:
<?php if ($option=="com_frontpage") {
            ?>
            <div> here we can add some html </div>
            <?php
        } ?>


This php checks to see if the frontpage is being viewed and if so will include some extra html. You could use other statements such as an IF ... ELSE statement to change the template output.


_________________
Technology to Solutions ( Skype : holy.geek_saffrongeek )
Given enough eyeballs , All bugs are shallow.
Collecting data is only the first step toward wisdom. But sharing data is the first step toward community


Top
   
 
Posted: Wed Oct 12, 2005 6:13 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sat Aug 27, 2005 1:57 am
Posts: 24
Location: Kuala Lumpur (Malaysia)
Try this trick....

1. Rename the two template you have like this

index_front.php
index_other.php

2. Create a file called index.php and use the code below

Code:
<?php
defined( "_VALID_MOS" ) or die( "Direct Access to this location is not allowed." );
switch ($option){
  case "com_frontpage": 
        require_once( "templates/$GLOBALS[cur_template]/index_front.php"); 
        break;

  default: 
        require_once( "templates/$GLOBALS[cur_template]/index_other.php" ); 
        break;

?>


3. You can have as many layout (multiple sub template) you want base on components being loaded.

You can also try another trick almost the same with the top example but different twist.

1. Create menu with url link = http://www.yourdomain.com/index.php?mytemplate=front <- notice this extra param

2. Now instead of switching the $option you switch $mytemplate
Code:
<?php
defined( "_VALID_MOS" ) or die( "Direct Access to this location is not allowed." );
switch ($mytemplate){
  case "front": 
        require_once( "templates/$GLOBALS[cur_template]/index_front.php"); 
        break;

  default: 
        require_once( "templates/$GLOBALS[cur_template]/index_other.php" ); 
        break;

?>

_________________
- Fiat Pax -
http://navy.mod.gov.my/index.php?lang=en


Last edited by abzahri on Wed Oct 12, 2005 6:22 am, edited 1 time in total.

Top
  E-mail  
 
Posted: Wed Oct 12, 2005 7:27 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Mon Oct 10, 2005 7:09 am
Posts: 210
Location: Payyannur, Kannur, Kerala,India
hi,

  /*****************************/
  /*    Wishing you Happy Navrathri  */ 
/*****************************/

  Thanks for  the reply.  I think this was the trick I was looking forward to. And thanks again for providing me  solutions with two options. Never before, I have a issue and solution with two alternate options. :)

    Sincerely thanking you once again for the consideration and conceRN

Harish Balakrishnan Marar

_________________
Technology to Solutions ( Skype : holy.geek_saffrongeek )
Given enough eyeballs , All bugs are shallow.
Collecting data is only the first step toward wisdom. But sharing data is the first step toward community


Top
   
 
Posted: Thu Oct 13, 2005 4:57 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Mon Oct 10, 2005 7:09 am
Posts: 210
Location: Payyannur, Kannur, Kerala,India
hi ,

  Yes. I was suceesful in using your solution.Well, this would assure someone like me in future to use this soulution.sp posting the confirmation of success.Thanks a lot for your concern and consideration.

Harish Balakrishnan Marar

abzahri wrote:
Try this trick....

1. Rename the two template you have like this

index_front.php
index_other.php

2. Create a file called index.php and use the code below

Code:
<?php
defined( "_VALID_MOS" ) or die( "Direct Access to this location is not allowed." );
switch ($option){
  case "com_frontpage": 
        require_once( "templates/$GLOBALS[cur_template]/index_front.php"); 
        break;

  default: 
        require_once( "templates/$GLOBALS[cur_template]/index_other.php" ); 
        break;

?>


3. You can have as many layout (multiple sub template) you want base on components being loaded.

You can also try another trick almost the same with the top example but different twist.

1. Create menu with url link = http://www.yourdomain.com/index.php?mytemplate=front <- notice this extra param

2. Now instead of switching the $option you switch $mytemplate
Code:
<?php
defined( "_VALID_MOS" ) or die( "Direct Access to this location is not allowed." );
switch ($mytemplate){
  case "front": 
        require_once( "templates/$GLOBALS[cur_template]/index_front.php"); 
        break;

  default: 
        require_once( "templates/$GLOBALS[cur_template]/index_other.php" ); 
        break;

?>



_________________
Technology to Solutions ( Skype : holy.geek_saffrongeek )
Given enough eyeballs , All bugs are shallow.
Collecting data is only the first step toward wisdom. But sharing data is the first step toward community


Top
   
 
Posted: Thu Oct 13, 2005 6:46 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Mon Oct 10, 2005 7:09 am
Posts: 210
Location: Payyannur, Kannur, Kerala,India
hi,

  I am able to use this template but I am not able to install this file.it says the template file is not valid and so what i did was I installed a dummy installation and then extracted the files to this folder.

It worked fine but the issue is that the template is not listed in the template manager->site templates.

What might be the reason:-





 
  7/10/2005
  Harish
  This template is released under GNU/GPL License.
 
 
  1.0
  template for bungalow.

 
    index.php
 

 
 
    images/bgr.png
    images/search_01.png
images/search_02.png
    images/menu_bgr.png
images/vmenu_bgr.png
    images/lineborder.png
images/pixel.png
    images/about-off.gif
images/about-on.gif
images/arrow.png
    images/brown-pixel.gif
images/btn-buyitnow.gif
images/btn-checkout.gif
images/btn-continue.gif
images/btn-moreinfo.gif
images/btn-moreinfo-red.gif
images/btn-submit.gif
    images/home-off.gif
images/home-on.gif
    images/info-on.gif
images/info-off.gif
    images/logo.gif
images/order-email.gif
images/otherstuff-off.gif
    images/otherstuff-on.gif
    images/shopforteas.gif
images/red-pixel.gif
images/teaclub-off.gif
images/teaclub-on.gif
    images/tea-off.gif
images/tea-on.gif
images/ttl-teaclub.gif
    images/ttl-newsletter.gif
images/wholesale-off.gif
images/wholesale-on.gif
images/ttl-featured-tea.gif
images/pic-home.jpg
    images/txt-home.gif
images/logo2.gif
    images/ic-cart.gif
    images/hd-cart.jpg
    images/ft-call-email.gif
 

 
  index_front.php
index_other.php
 

 
    css/template_css.css
css/template_css1.css
 




the above is the template installer file that is said to have some error but why should this be not showing in the site templates.

 

_________________
Technology to Solutions ( Skype : holy.geek_saffrongeek )
Given enough eyeballs , All bugs are shallow.
Collecting data is only the first step toward wisdom. But sharing data is the first step toward community


Top
   
 
Posted: Fri Oct 14, 2005 4:17 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sat Aug 27, 2005 1:57 am
Posts: 24
Location: Kuala Lumpur (Malaysia)
You must have a name for your template. Your template name is missing in line 4. Let say you name test, you should put.

example:

test

One more thing to remenber is to rename the dir where you copied the template to the same name.

example:

../template/solarflare/    -> ../template/test/

_________________
- Fiat Pax -
http://navy.mod.gov.my/index.php?lang=en


Top
  E-mail  
 
Posted: Fri Oct 14, 2005 6:30 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Mon Oct 10, 2005 7:09 am
Posts: 210
Location: Payyannur, Kannur, Kerala,India
hi,

  Sorry for being so useless. I have tried it but this time i have added the name and not able to get success installing. Also, on extracting this file over a dummy installed template with the same, the issues still exists.

  Very much confused and feeling to cry.

Thanking you for the patience and concern shown for me
Harish

abzahri wrote:
You must have a name for your template. Your template name is missing in line 4. Let say you name test, you should put.

example:

test

One more thing to remenber is to rename the dir where you copied the template to the same name.

example:

../template/solarflare/    -> ../template/test/

_________________
Technology to Solutions ( Skype : holy.geek_saffrongeek )
Given enough eyeballs , All bugs are shallow.
Collecting data is only the first step toward wisdom. But sharing data is the first step toward community


Top
   
 
Posted: Sun Oct 16, 2005 4:37 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Mon Oct 10, 2005 7:09 am
Posts: 210
Location: Payyannur, Kannur, Kerala,India
hi ,

      I am still with this problem and really worried about if i need to change the template toany other i am not being able to do so.Don't find me rude ,if i ask for a favour for helping me with a working copy of xml file. I have added the file above and the name added :-




  hari
  7/10/2005
  Harish
  This template is released under GNU/GPL License.
  hbmarar@rediffmail.com
 
  1.0
  template

 
    index.php
 

 
 
    images/bgr.png
    images/search_01.png
  images/search_02.png
    images/menu_bgr.png
  images/vmenu_bgr.png
    images/lineborder.png
  images/pixel.png
    images/about-off.gif
  images/about-on.gif
  images/arrow.png
    images/brown-pixel.gif
  images/btn-buyitnow.gif
  images/btn-checkout.gif
  images/btn-continue.gif
  images/btn-moreinfo.gif
  images/btn-moreinfo-red.gif
  images/btn-submit.gif
    images/home-off.gif
    images/home-on.gif
    images/info-on.gif
  images/info-off.gif
    images/logo.gif
  images/order-email.gif
  images/otherstuff-off.gif
    images/otherstuff-on.gif
    images/shopforteas.gif
  images/red-pixel.gif
  images/teaclub-off.gif
  images/teaclub-on.gif
    images/tea-off.gif
  images/tea-on.gif
  images/ttl-teaclub.gif
    images/ttl-newsletter.gif
  images/wholesale-off.gif
  images/wholesale-on.gif
  images/ttl-featured-tea.gif
  images/pic-home.jpg
    images/txt-home.gif
  images/logo2.gif
    images/ic-cart.gif
    images/hd-cart.jpg
    images/ft-call-email.gif
 

 
  index_front.php
  index_other.php
 

 
    css/template_css.css
  css/template_css1.css
 



Requesting your concern and wishing you a nice week ahead,

Hari

_________________
Technology to Solutions ( Skype : holy.geek_saffrongeek )
Given enough eyeballs , All bugs are shallow.
Collecting data is only the first step toward wisdom. But sharing data is the first step toward community


Top
   
 
Posted: Sun Nov 06, 2005 7:05 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Mon Oct 10, 2005 7:09 am
Posts: 210
Location: Payyannur, Kannur, Kerala,India
hi,

  Is it possible to switch to a particular template based on the task.LIke to have 'lostPassword' task only istaken to a different template and registration in another.

  would this logic work

  switch($option)

        case "com_registration":
                  switch($task)
                            case "lostPassword":
                                      password template.

                    default:
                              normal registration template
          default:
              default tamplate

Thanks for the concern and consideration in advance,I remain

Harish
             

_________________
Technology to Solutions ( Skype : holy.geek_saffrongeek )
Given enough eyeballs , All bugs are shallow.
Collecting data is only the first step toward wisdom. But sharing data is the first step toward community


Top
   
 
Posted: Tue Nov 08, 2005 12:59 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sat Aug 27, 2005 1:57 am
Posts: 24
Location: Kuala Lumpur (Malaysia)
Yes it is possible to do so...

I think you've got it. Once you know the trick the possibilities is endless. It shouldn't be any problem. How about your other problem where you couldn't get you template to appear?

I suggest you start over. Copy your template somewhere else. Remove/delete the dir. Also remember to delete all dir with the same name in your template folder. Now start over fresh.

_________________
- Fiat Pax -
http://navy.mod.gov.my/index.php?lang=en


Top
  E-mail  
 
Posted: Tue Nov 08, 2005 5:10 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Mon Oct 10, 2005 7:09 am
Posts: 210
Location: Payyannur, Kannur, Kerala,India
hi,

        once the template was installed ,I copied the working sub templates files to that folder.But still, even though it is working fine,I am not able to make out why it is not listed in templates list.

        Regardging the seperate templates based on task i have made it working and i have posted about how i have done in repository of solutions at the following thread:

http://forum.joomla.org/index.php/topic ... #msg104265

Thanks for the concern and consideration and the query about my issue,

with regards

Harish

_________________
Technology to Solutions ( Skype : holy.geek_saffrongeek )
Given enough eyeballs , All bugs are shallow.
Collecting data is only the first step toward wisdom. But sharing data is the first step toward community


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group