Hello-
I'm using travelouge theme on .764 and have a probably really easy question but I caouldn't locate the answer searching. It's a hard thing to search on anyways...
I want to either change the theme entirely or at least the CSS referenced if a particular module is loaded. Something like this (and I thought I saw this in pn.8 but not sure):
if $module = 'TheGate' {
use this template = "thegate.htm"; }
I a total noob whit Smarty and PHP so don't laugh. I think you get the point. Anyways, any help would be appreciated.
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- michiel responded to »password problem« 10:01 AM
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Loading a differnt theme style based on module .764
-
- Rank: Moderator
- Registered: Mar 15, 2005
- Last visit: May 30, 2010
- Posts: 1077
-
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: May 18, 2010
- Posts: 985
well, for a Xanthia template you could use
Code
In Xanthia you can assign template to a module, I have only done this once, so I don't remember....
perhaps this works too [never done this]:
Code
<!--[if $module == "TheGate"]-->
<!--[include file="theGate.htm"]-->
<!--[else]-->
<!--[$maincontent]-->
<!--[/if]-->
- Igor -
- Rank: Team Member
- Registered: Sep 06, 2006
- Last visit: May 09, 2010
- Posts: 2446
Even easiest if you learn how to assign a specific template to your modules at the Xanthia Admin Panel, in the Edit theme options. You can clone your master.htm (in example), rename it to thegate.htm and assign it to TheGate module.
No conditionals needed with this assignment method.
And EVEN EASIEST with 0.8. Just an addition in your theme's pageconfiguration.ini:
[TheGate]
file = thegate.ini
and in the thegate.ini:
page = thegate.htm
palette = yourpalette
[blocktypes]
[blockpositions]
[blockinstances]
Good luck with that ;)
--
- Mateo T. -
Mis principios... son mis fines -
- Rank: Moderator
- Registered: Mar 15, 2005
- Last visit: May 30, 2010
- Posts: 1077
Thanks so much for your suggestions, I will try this and report back for future searching :) -
- Rank: Moderator
- Registered: Mar 15, 2005
- Last visit: May 30, 2010
- Posts: 1077
I tried using Xanthia to assign thegate.htm to the module but couldn't seem to get that working so...
I edited my master.htm to say..
Code
<!--[if $module == "TheGate"]-->
<!--[include file="TheGate.htm"]-->
<!--[else]-->
Then I put in the master htm stuff then at the end did the
Code
<!--[/if]-->
Then I made thegate.htm just replace the changes in the else from master.htm
Then called those changes in the CSS for the newly created header images, etc.
It worked beutifully. Thanks for the help guys. -
- Rank: Team Member
- Registered: Dec 07, 2003
- Last visit: May 09, 2010
- Posts: 2703
jaenosjelantru
I tried using Xanthia to assign thegate.htm to the module but couldn't seem to get that working so...
I edited my master.htm to say..
Code
<!--[if $module == "TheGate"]-->
<!--[include file="TheGate.htm"]-->
<!--[else]-->
I agree this will work... but it is defeating what Xanthia does already. Are your module templates initialized?
Anyway, here is a neat trick you can use for stylizing module stuff through the master.htm.
Code
<div id="<!--[module]-->
You can use any element body, div, span, ect. and just assign the module as the id. Then reflect any change you need in your style.css.
--
David Pahl
Zikula Support Team -
- Rank: Team Member
- Registered: Dec 07, 2003
- Last visit: May 09, 2010
- Posts: 2703
Of course you could also apply this logic to a style sheet filter... ect. pnRender and CSS are awesome this way..
--
David Pahl
Zikula Support Team -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 27
So what might you do here if you wanted to apply this to the news modules.
I want to change the banner if I'm on one specific topic of the news module. I did the following
Code
But this doesn't seem to work. I I take out the topic it works ok.
Thanks
Jason -
- Rank: Team Member
- Registered: Sep 06, 2006
- Last visit: May 09, 2010
- Posts: 2446
You can always use <!--[pndebug]--> to see the loaded variables.
In this case, the $topic vas is a module specific variable, and it's assigned after the Theme templates are already loaded, so, you need to get the topic value from the input before use it in Theme templates. Something like:
Code
<!--[pnvarcleanfrominput name="topic" assign="topic"]-->
<!--[if $module eq "News" and $topic eq 1]-->
...
Try that
--
- Mateo T. -
Mis principios... son mis fines
- Moderated by:
- Support
