[development] Block php snippet not failing

Vangend info at marcvangend.nl
Sat Oct 31 22:18:59 UTC 2009


try something like:
if ($_GET['q'] == catalog/16 && $_GET['page'] == '0,0') {
  // do stuff
}
Note that the $_GET variable is automatically decoding special 
characters in the url. "%2C" is in fact an encoded comma, so check for 
$_GET['page'] == '0,0', not $_GET['page'] == '0%2C0'.

Marc



Jeff Greenberg wrote:
> Earl Miles wrote:
>
>>
>> Check $_GET['page'] for that part, rather than checking the request uri.
>>
>>
> Hi Earl. I started with $_GE['page'], but the question (in my own 
> sleep-deprived mind) arose, how do I get it to show only on page 1 of 
> THAT page, as opposed to page 1 of another view?  I first tried to use 
> $nid and drupal_get_path_alias, but it appears that $nid is not 
> exposed at this point.
>


More information about the development mailing list