Member
Member
Ralf   2020-12-11, 08:44
#1

Hi,
wondering if it possible to display a specific content on a page (via codeblocks) depending on the theme.
For example something like this:

Problem is the 'theme==....' part - not sure if such a parameter 'theme' exists.

Ralf

Administrator
Administrator
acrylian   2020-12-11, 09:26
#2

You can use this function to get the current theme:
https://docs.zenphoto.org/1.5.x/function-getCurrentTheme.html

I personally would not do things like this via codeblocks but rather modify a theme (in fact I never use codeblocks myself). Codeblocks are a workaround and you easily forget what you did in a codeblock or did something at all especially if you have a lot of pages etc.

Administrator
Administrator
fretzl   2020-12-11, 09:28
#3

if ( getCurrentTheme() == "paradigm" ) {....}

Member
Member
Ralf   2020-12-11, 10:08
#4

Hi Fretzl,

thanks a lot - that works perfect :-)

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.