Page 1 of 11
uCoz Community » uCoz Modules » Additional Features » Conditional Operator (uri code)
Conditional Operator
uEd
Posts: 6
Reputation: 0

Message # 1 | 7:45 PM
Method 1. Want this to work

Code
<?if($REQUEST_URI$=='$REQUEST_URI$$mobi]')?>Mobile<?else?>Desktop<?endif?>


Method 2. working

Code
<?if($REQUEST_URI$=='/news/entry/2013-01-01-01$mobi]')?>Mobile<?else?>Desktop<?endif?>


i want to display mobile template when $mobi is added to any url.
$REQUEST_URI$$mobi

Preview and More Detail
Post edited by uEd - Tuesday, 2013-07-23, 3:08 AM
Cyberdasm
Posts: 605
Reputation: 6

Message # 2 | 2:43 PM
uEd,
1F4BF3B

admin@lizeal.tk
www.lizeal.tk
Post edited by dense0293 - Tuesday, 2013-07-23, 2:49 PM
Sunny
Posts: 9296
Reputation: 456

Message # 3 | 2:53 PM
uEd, by adding $mobi after an URL you in fact create duplicate URLs, and uCoz is going to get rid of this possibility, therefore neither of the methods will work. It's better to do it in the following way (add /pda before /news:

Quote
/pda/news/entry/2013-01-01-01


If you have any further questions, please continue here: http://forum.ucoz.com/forum/37-471-1

Locked.

I'm not active on the forum anymore. Please contact other forum staff.
uCoz Community » uCoz Modules » Additional Features » Conditional Operator (uri code)
Page 1 of 11
Search: