Reply New Topic
2012/5/10 0:23:07
#1
Offline
Home away from home

How to use one concrete theme only for a module?

I am trying to use an special theme for wiki module.
I mean: I have a default theme and I want to use a different theme only for wiki module.
I have tried two possibilities; no success.
1.- Creating a PHP block with this content and visibility only for all pages of wiki module:
$GLOBALS['icmsConfig']['theme_set'] = 'mytheme';<

2.- Putting that code in a PHP module file

Any ideas?


2012/5/10 1:41:46
#2
Offline
Home away from home

Re: How to use one concrete theme only for a module?

Something using the "Defacer" module - which is based on Symlinks - could be used to change the theme on any link starting /mdoules/wiki to the new one

Although I'm sure a simple code based solution should be possible... perhaps even a simple check from within the theme itself of the current module being used?


2012/5/10 5:28:29
#3
Offline
Home away from home

Re: How to use one concrete theme only for a module?

Does your theme for the wiki use a different HTML markup, or just different CSS?

If it is just different CSS, you could conditionally include the CSS in the theme based on $icms_dirname Smarty variable. You could probably also do the same for the HTML portion, too.

_________________
Christian Web Resources
Facebook

2012/5/18 13:57:01
#4
Offline
Home away from home

Re: How to use one concrete theme only for a module?

you can create a big brother theme with just logic like if module == wiki include this else that.

This is much easier in Boiler because of skins. :)


2012/5/20 7:20:04
#5
Offline
Home away from home

Re: How to use one concrete theme only for a module?

Quote:

you can create a big brother theme with just logic like if module == wiki include this else that.
This is much easier in Boiler because of skins. :)



Yes, but it is a hard work and it seems strange that code is not working.

Better wait the great Boiler theme and its skins options.


2012/5/21 12:12:09
#6
Offline
Home away from home

Re: How to use one concrete theme only for a module?

Quote:


debianus wrote:

Yes, but it is a hard work and it seems strange that code is not working.

Better wait the great Boiler theme and its skins options.



To override the theme completely on a page or for a module, you'll have to do the logic in the theme - the way a site renders starts with the theme, then cascades down to the module and then to the blocks. When you change the theme_set in a block or module, the theme has already started rendering.

_________________
Christian Web Resources
Facebook

2012/5/22 2:57:43
#7
Offline
Webmaster

Re: How to use one concrete theme only for a module?

Could the theme to use become an attribute of a symlink? Then it would be very easy to do this kind of thing. I think that's in the direction the defacer module works.

If you change enough code (HTML, CSS or PHP), you can accomplish anything. That's not what people choose a CMS for, most of the time they don't want to (or can't) change the source files. So we should look into making requested features available in the ACP when they have enough interest for our projected user base (the 80% rule).

_________________

Me on OpenHub


Reply New Topic extras
 Previous Topic   Next Topic
You can view topic.
You can start a new topic.
You can reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You can post without approval.