[solved] Only show if on page 1 of pagination help

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
RepublicOfDavid
New Member
New Member
Posts: 3
Joined: Mon Sep 12, 2011 10:43 am

[solved] Only show if on page 1 of pagination help

Post by RepublicOfDavid »

Hi All,

Was wondering if anybody could help, I need to find a way to allow the content block to only appear on the first page of the pagination, here is how my code currently looks:

Code: Select all

{content}

<br/>

{cms_module module="experiences" what="experiences" detailpage="experience" nbperpage="4" query="6"}

My URL Example:

http://www.siteaddress.com/index.php?ma ... 65&page=65


From looking at my URL I guess the snippet to reference would be ‘pageindex=1’ however I can not get any code to work, I was thinking something like this:

Code: Select all


{if $pageindex>1}

{content}

{else}
{/if}

<br/>

{cms_module module="experiences" what="experiences" detailpage="experience" nbperpage="4" query="6"}
Any help would be great,

Cheers,
David
andy1984
New Member
New Member
Posts: 5
Joined: Mon Sep 12, 2011 2:09 pm

Re: Only show if on page 1 of pagination help

Post by andy1984 »

use php $_GET['pageindex']

try this:

Code: Select all

{php}
if($_GET['pageindex'] > 1){
echo "{content}";
 }else{
echo "display something else";
}
{/php}
RepublicOfDavid
New Member
New Member
Posts: 3
Joined: Mon Sep 12, 2011 10:43 am

Re: Only show if on page 1 of pagination help

Post by RepublicOfDavid »

Perfect, thanks very much
Post Reply

Return to “The Lounge”