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.
Hello,
is it possible to insert a defined var in a preprocess function (template.php) in the php code of a contextual filter ?
I have tried this code without success (i get notices & errors):
$test = variable_get(myvar); // myvar is a defined var in my preprocess function
if (isset($test)) {
return $test;
}
return null;
Thanks for your help.
Comments
Comment #1
kumkum29 CreditAttribution: kumkum29 commentedComment #2
MustangGB CreditAttribution: MustangGB commentedClosing this as outdated to tidy up a bit around here. If you're still having problems with the latest release please create a new issue.