If theme = this don't show it???

Started by kaamaru, July 30, 2010, 12:29:45 PM

Previous topic - Next topic

kaamaru

How can I disable some code depending on what theme it is? Could you do something with the theme IDs?

flapjack

why don't you disable in the theme template file? this is their sole purpose - to make things look different when using different themes

kaamaru

But I need to do it in the sources file so I can disable recaptcha on my mobile theme.

flapjack

Quote from: Calumks on August 01, 2010, 05:20:12 AM
But I need to do it in the sources file so I can disable recaptcha on my mobile theme.
that's the key. disable it in the theme not in the source files. it's not possible to disable anything that produces some output just by disabling it in Sources. it's the templates where everything is being displayed

kaamaru

But, on Simple Portal you can do to disable the portal on a theme and this uses a sources file.

   $no_portal_themes = array(16);
   if (
in_array($settings['theme_id'], $no_portal_themes))
      
$blocks getBlockInfo(array(23), nulltruetrue);
   else
      
$blocks getBlockInfo(nullnulltruetrue);

flapjack

well, it doesn't work this way with themes

if you disable something in the source files, you still need to edit your theme file to reflect that change, so you will have to modify template file in the end as well

kaamaru

I didn't have to with Simple Portal. Can't you just use the if function so that if it's the other theme you can just use the default code?

Actually never mind, I'll figure it out on my own.

flapjack

with SP it's simple yes-no, when it comes to theme, it's still being displayed

Source files is where the content comes from, display templates will still display the area. if you disable the code in Source you will break the template

Advertisement: