How to edit a custom region from an Omega subtheme in Drupal 7
-
I created a new region in my Omega subtheme called MYTHEME-MENU. I want this region to do the same thing as the normal menu region, but with adding some markup. What is the proper way of doing this (I don't want to add the markup in Omega's region-menu.tpl.php file)? I see I have a template, process and preprocess directories along with an empty template.php file, but I'm not sure how to use these. Essentially my MYTHEME-MENU region needs to spit out the following: <div<?php print $attributes; ?>> <div<?php print $content_attributes; ?>> <span class="nav-bg"></span> <?php if ($main_menu || $secondary_menu): ?> <nav class="navigation"> <?php print theme('links__system_main_menu', array('links' => $main_menu, 'attributes' => array('id' => 'main-menu', 'class' => array('links', 'inline', 'clearfix', 'main-menu')), 'heading' => array('text' => t('Main menu'),'level' => 'h2','class' => array('element-invisible')))); ?> <?php print theme('links__system_secondary_menu', array('links' => $secondary_menu, 'attributes' => array('id' => 'secondary-menu', 'class' => array('links', 'inline', 'clearfix', 'secondary-menu')), 'heading' => array('text' => t('Secondary menu'),'level' => 'h2','class' => array('element- invisible')))); ?> </nav> <?php endif; ?> <?php print $content; ?> </div> </div>
-
Answer:
I'm trying to get a similar issue solved. In your case, I think you also need to have the region.tpl.php file in your custom templates folder also.
tmolhook at Drupal Answers Visit the source
Other answers
You don't need to create another region for that. You just have to copy the Omega file omega/templates/region--menu.tpl.php to your subtheme's template folder: MYTHEME/templates/region--menu.tpl.php. There you can make whatever changes you need.
hiphip
Related Q & A:
- How To Make A Custom Motorcycle?Best solution by Yahoo! Answers
- How to edit a spreadsheet with Coldfusion?Best solution by Stack Overflow
- How to create a custom email template?Best solution by Salesforce
- How to use a custom font in html?Best solution by Stack Overflow
- How to add a custom picture into Yahoo answers avatar?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.