Page 1 of 1

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

Posted: Mon Sep 12, 2011 3:40 pm
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

Re: Only show if on page 1 of pagination help

Posted: Tue Sep 13, 2011 12:21 pm
by andy1984
use php $_GET['pageindex']

try this:

Code: Select all

{php}
if($_GET['pageindex'] > 1){
echo "{content}";
 }else{
echo "display something else";
}
{/php}

Re: Only show if on page 1 of pagination help

Posted: Tue Sep 13, 2011 2:49 pm
by RepublicOfDavid
Perfect, thanks very much