1

My goal is to have an additional region class, when region is rendered on my page--node--9 I am using this template_preprocess_region() function to do this.

But how i can get inside my function ID of page, region is rendered on?

2
  • nid means Node ID, clarify your question.
    – M a m a D
    Commented Mar 19, 2015 at 14:42
  • I have page that is customized by page--node--9.tpl.php. That page contain a region, and only on this page it should have additional class. How can i do this via preprocess function i mentioned? I mean how to pass page number, in this case 9 into my preprocess function, to create condition?
    – Bhok
    Commented Mar 19, 2015 at 14:50

1 Answer 1

1

From another implementation of the same hook I found out that the node is actually available through the following. Try it out.

  $node = $variables['node'];

From there you can get node id.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.