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, i will like to create 3 new regions above the highlighted content area called preface_first, preface_middle and preface_last. All shown in-line like itd previewed in the Acquia Marina theme http://drupal.org/node/357261.
I have edited the .info file of my zen sub theme but the problem is what i should do in my page.tpl page. Please any help will be highly appreciated.
Comment | File | Size | Author |
---|---|---|---|
#1 | local-site.jpeg | 69.12 KB | Deepika.chavan |
Comments
Comment #1
Deepika.chavan CreditAttribution: Deepika.chavan commentedHi ,
I created preface_first, preface_middle and preface_last regions in my zen sub theme on my local site.
1. Added following line of code in myzen.info (myzen - name of my zen's subtheme)
2. Added following code in page.tpl.php after
<div id="main-wrapper"><div id="main" class="clearfix<?php if ($primary_links || $navigation) { print ' with-navigation'; } ?>">
this line and before this<div id="content" class="column"><div class="section">
line.Code to be added in page.tpl.php :
3. Css for above regions:
3.a. Added following line of code in myzen.info
3.b. Created new file i.e. myzen.css in theme's '/css' directory and added following css code in it -
Please clear the cached data. Check the attachment to see the regions on my local site.
Rgrds,
Deepika Chavan.
Comment #2
greenavus CreditAttribution: greenavus commentedThanks alot for your help. It worked very well.
Comment #3
Weka CreditAttribution: Weka commentedThank you for the solution Deepika.
What is the reason for creating a new CSS file (per directions in #1 3.b.) and not just modifying the already provided CSS files?
The #navigation is already declared in layout-fixed.css.
Comment #4
Deepika.chavan CreditAttribution: Deepika.chavan commentedHi Weka,
We can modify the core files but it is not a good practice. Instead we can create a new custom file and override the core css without touching it, this is what I believe. I am happy that you found my solution useful.
Rgrds ,
Deepika Chavan.
Comment #5
Weka CreditAttribution: Weka commentedI was only referring to the CSS files inside my sub theme, I did not realize these are considered core files. I thought that was the whole reason for creating a sub theme so the files copied into the sub theme can be modified without making any changes to the main Zen theme files. Now I am a bit confused.
Comment #6
Deepika.chavan CreditAttribution: Deepika.chavan commentedHi Weka,
I apologies for making you confused. But as there are many css files, instead of making changes in different files we should make our custom css so that we will get our css changes in one file, this is my opinion. You can make changes in your custom theme.
Rgrds,
Deepika Chavan.
Comment #7
Weka CreditAttribution: Weka commentedThat is a good point.
Thank you for clarifying.