1
rgauci
how to link to a second themeplate
  • 2010/2/15 17:44

  • rgauci

  • Not too shy to talk

  • Posts: 173

  • Since: 2007/8/31


I have create a php file with this code

<?php if (file_exists("mainfile.php")) 
{     include(
"mainfile.php"); 
} elseif(
file_exists("../mainfile.php")) {     
include(
"../mainfile.php"); 

else {     include(
"../../mainfile.php"); 

include(
XOOPS_ROOT_PATH "/header.php");   include_once XOOPS_ROOT_PATH.'/class/template.php'; include_once(XOOPS_ROOT_PATH.'/modules/worldcup/blocks/items_spot.php');  $result worldcup_items_spot_show(explode('|','1|5|0|0|1|1|bullet'));  $tpl = new XoopsTpl(); $tpl->assign('block'$result);  $tpl->display('db:worldcup_items_spot_slide.html');  include_once XOOPS_ROOT_PATH.'/class/template.php'

include_once(
XOOPS_ROOT_PATH.'/modules/worldcup/blocks/items_columns.php');  $result worldcup_items_columns_show(explode('|','2|0|4|256|normal'));  $tpl = new XoopsTpl(); $tpl->assign('block'$result);  $tpl->display('db:worldcup_items_columns.html');   
?>  
<?php include(XOOPS_ROOT_PATH "/footer.php"); ?>


At the moment the theme that comes up is the Default Theme which I have set in the General Settings.

Now I am using Defacer to be able to use different themes to different modules. This works fine.

The problem with the code above is that I need to point it to one of my other Themes than the default Theme

Any ideas!!!

2
kris_fr
Re: how to link to a second themeplate
  • 2010/2/15 18:33

  • kris_fr

  • Theme Designer

  • Posts: 1009

  • Since: 2005/12/31


hi,

use ghost module for your php code

@+

3
rgauci
Re: how to link to a second themeplate
  • 2010/2/15 18:57

  • rgauci

  • Not too shy to talk

  • Posts: 173

  • Since: 2007/8/31


hi kris_fr

I am not sure about using a ghost module

1) I created a file by the name worldcup.php with the above codes

2) In my home page did a small gif banner that when clicked takes you to the worldcup.php

3) Cloned publisher module to worldcup and created a Theme totally different from my default theme (using Defacer)

Now this is the action bit:

On my Main Menu if I click on worldcup the worldcup Theme comes up successfully BUT if I click on the gif banner although the module come up but the Theme is not the worldcup one but the default theme that I am using for the rest of the website.

I need to put some code in my worldcup.php file echoing to pick the worldcup theme and not the default theme

hope I explained properly

Ray

4
ghia
Re: how to link to a second themeplate
  • 2010/2/15 23:35

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


As Kris said use the ghost module. In the file is indicated where you can put your php code in.
Advantage will be that you are switching modules and that is something where defacer can react upon. I don't think it is possible for a kind of external file as yours.

Login

Who's Online

265 user(s) are online (161 user(s) are browsing Support Forums)


Members: 0


Guests: 265


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits