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 Anonymous (not verified) on
Hi all,
I tried looking around but didn't seem to get any farther so i'm hoping I can get some answers to my question quicker this way. Any help would be appreciated.
This is from a already custom theme created that I am just trying to modify but in page.tpl.php there are variables like $page['main_nav'] and $page['more_footer']. Are these pages or blocks created in drupal? Like where do I access, example "Main_nav", so I can change the layout?
Thanks in advance.
Comments
Regions... probably
They're probably regions, you can check in your themes info file if there are regions with the same machine name. If they are regions you can create region templates (lots of info about template suggestions in D7, just search/google it).
If they're not regions, then the theme or a module are creating those variables so you'd need to backtrace to find where those things are coming from.
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
I looked in the .info file
I looked in the .info file and they are regions. But in the "templates" folder I do not see any region templates associated with them. I'll dig around some more to see where they may be. Thanks
Study the the D7 template
Study the the D7 template system: https://www.drupal.org/docs/7/theming/core-templates
Templates can come from many places, most likely a base theme or Drupal core it self. There is likely only one - region.tpl.php, you can create region specific templates if you need to override one or more regions, i.e. region--[region].tpl.php
https://www.drupal.org/node/1089656
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
Thanks man. I'll going
Thanks man. I'll going through tutorials and information I can find.