Forum Moderators: coopster

Message Too Old, No Replies

What if conditional methode to do this? please help

         

basketmen

5:41 pm on May 16, 2015 (gmt 0)

10+ Year Member



i have responsive template, its have 3 php files :

- templatedesktop.php : template file for desktop

- templatemobile.php : template file for mobile


- page.php : contain information content, its included templatedesktop.php & templatemobile.php file inside

now i need to hide some part inside page.php, that should hide from mobile version, and appeared in desktop version only


i already tried add this define code inside templatedesktop.php file :
define('THIS_SCRIPT', 'templatedesktop');


and wrap some part that want to hide

if (THIS_SCRIPT == 'templatedesktop')
{
some part that want to hide
}


but its not working, maybe its should do the opposite, please help what is the right if conditional/methode? like request, referer or other

whitespace

7:48 pm on May 16, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



The general idea looks ok. However, enable full error_reporting to make sure your constants are defined (and you're not trying to redefine) etc...


error_reporting(E_ALL | E_STRICT);



if (THIS_SCRIPT == 'templatedesktop')
{
some part that want to **SHOW**
}