NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: jtailleur on January 25, 2012, 04:00:36 PM

Title: Records per Page
Post by: jtailleur on January 25, 2012, 04:00:36 PM
Is there any way to set the records per page differently for mobile vs. normal browser mode?


Joe.
Title: Re: Records per Page
Post by: Bruce on January 25, 2012, 11:44:11 PM
I suspect this sort of question is going to be increasingly common in the time to come.
the generic answer is something like this;

The "lines per page" is an expression.
The Clarion CHOOSE command let's you place an "IF" statement inside an expression.
the p_web.IsMobile() method tells you if it's mobile or not.

so, in your case, the "Lines per page" expression becomes something like

CHOOSE(p_web.IsMobile()>0,5,10)

Where 5 is the number of lines for mobile, and 10 is for desktop.
Also - do not be tempted to drop the >0 part of the expression - it's important.

cheers
Bruce
Title: Re: Records per Page
Post by: jtailleur on January 26, 2012, 07:32:10 AM
Very, very, slick.  :)

Exactly what I wanted; thanks Bruce.


Joe.