Heosforo Posted February 18, 2018 Share Posted February 18, 2018 Hello guys. I'm trying to resolve this from last night and still nothing. HTML logic If you need to check the value of a theme setting in an HTML logic tag (for example, to determine whether a block of HTML should be shown or not), a short-hand variable is available to you: theme.your_theme_key A real-world example: {{if theme.forum_layout === 'grid'}} ... {{else}} ... {{endif}} I have created a number field and I have this: {template="userPhoto" group="global" app="core" params="\IPS\Member::load( 1 )"} How could I show the chosen number? {template="userPhoto" group="global" app="core" params="\IPS\Member::load( {theme.your_theme_key} )"} {template="userPhoto" group="global" app="core" params="\IPS\Member::load( {{if theme.your_theme_key}}{{endif}} )"} It doesn't seem to work, what am I doing wrong? Thanks for any help. Link to comment Share on other sites More sharing options...
Heosforo Posted February 18, 2018 Author Share Posted February 18, 2018 bump Link to comment Share on other sites More sharing options...
Brian A. Posted February 19, 2018 Share Posted February 19, 2018 Try this instead (just thinking): {{$loadMember = \IPS\Theme::i()->settings['your_setting_key'];}} {template="userPhoto" group="global" app="core" params="\IPS\Member::load( $loadMember )"} Haven't tested yet, so please tell me if it works. Link to comment Share on other sites More sharing options...
Heosforo Posted February 19, 2018 Author Share Posted February 19, 2018 Thanks mate but it doesn't work . I'll keep trying Link to comment Share on other sites More sharing options...
newbie LAC Posted February 19, 2018 Share Posted February 19, 2018 Hello, 3 hours ago, Heosforo said: Thanks mate but it doesn't work Should be works. Have you changed the key \IPS\Theme::i()->settings['your_setting_key'] Link to comment Share on other sites More sharing options...
Heosforo Posted February 19, 2018 Author Share Posted February 19, 2018 Sorry my bad. Works perfect! Thank you very much both of you Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.