Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By drummondf on
I need to display a block on a specific query string URL (i.e. www.mysite.com/civicrm/event/register?reset=1&id=1089)
I found this code which I believe is for D7, because it WSODs the site when used:
<?php
$match = FALSE;
if (current_path() == 'civicrm/event/register' && isset($_GET['id']) && $_GET['id'] == 1089) { $match = TRUE; }
return $match;
?>
https://www.drupal.org/project/block_query is a no go, also for D7
Can anyone guide me on how to format the above Block PHP code for D6?
Thank you!
Comments
There is no current_path()
There is no current_path() for D6, instead you can use
$_GET['q']