Posted by Sandip Choudhury on February 26, 2013 at 11:05am
Hello,
Is there any way to create new region in bartik theme to place the block within and without editing the .info/page.tpl.php file? That is by any module.
I have seen that with live themer module (http://drupal.org/project/livethemer), it is possible to edit the CSS. So I am wondering is there any module to create new region?
Also I want to put an image in bartik theme in the back of drupal logo, in the place of blue gradient. Is this possible with any module and without editing the code?
Comments
For any of these, you're
For any of these, you're going to have to edit the code. I'd say that this would be a good way to learn how to theme Drupal. But, if you do, make sure to copy Bartik into sites/all/themes before making changes. If you decide to make theme changes, let us know and we'll help you out.
Front-End Developer and Site Builder. My portfolio is available on my website
Thanks for the information. I
Thanks for the information. I know little bit of coding. I am new to drupal and I am really impressed that you and drupal community is so helpful.
However do you use modules Livethemer, Sweaver, Panels and Panels Everywhere? What is your impression about these?
Sandip Choudhury
www.D.SandipArt.com
It's going to be a lot easier
It's going to be a lot easier for you to learn to edit your theme than it will be for you to learn panels or panels everywhere, and I haven't used livethemer or sweaver. I'd highly suggest digging into your theme files. What you're asking to do is really simple and I'd be happy to teach you how to do it through your theme files.
Front-End Developer and Site Builder. My portfolio is available on my website
Thanks for your quick reply
Thanks for your quick reply and helpful information. Sure I shall dig the code. And also will remember your helpful nature.
I have checked your website and seen very good website that you have developed.
Sandip Choudhury
www.D.SandipArt.com
Thank you. I'm glad that you
Thank you. I'm glad that you like my work. Here's what you need to do.
First, copy the Bartik theme into sites/all/themes and give the folder a new name. Let's say, Bartik_New. Also rename the .info file to Bartik_New, or whatever you named your folder.
Second, go into the .info file. You should see a lot of regions listed. Add the region you want wherever you want in the regions list using the same formatting. EX: regions[REGION] = REGION NAME. "regions[REGION]" determines how you will call the region in your template file. The text after the equal sign is what the region will be called in the blocks administration screen.
Third, go into the page.tpl.php file in the templates folder. Find where you want to place the region and copy
<?php print render($page['REGION']); ?>into that place. You can place divs around that region if you'd like.Fourth, go to the appearance tab and enable the new theme. If you'd like, you can also set it as the default (what everyone sees).
Fifth, before you start adjusting the theme, you're going to want to download Firefox (if you don't already have it) and install the extension FireBug. This will allow you to play around with CSS and find the selectors that you will need to use for theming your site.
Sixth, go into the css folder and open style.css. Enter any necessary CSS coding at the end of this document.
Let me know if you have any questions.
Front-End Developer and Site Builder. My portfolio is available on my website
CSS in New Region
I amazed that you have written this whole thing and giving so many valuable time for me. Moreover, I have inspired from your career that you become Drupal Developer from Car Washer. So struggled career!
Is it mandatory that, I have to place div CSS around this
<?php print render($page['REGION']); ?>?If I do not place DIV then what will happen and where this region will placed in the Bartik theme?
If I place DIV, then I think I have to declare the position/margin/padding in the CSS. In addition, this should be in Nested DIV. Is this right?
Is Drupal 7 support HTML 5 and CSS 3? Do I need to do any special declaration or configuration for this? Alternatively, do I need this module http://drupal.org/project/html5_tools ?
Actually currently, I am learning Drupal 7, CSS 3 and HTML 5. Therefore, I have confusion.
Sandip Choudhury
www.D.SandipArt.com
Glad I can help. You don't
Glad I can help.
You don't have to place a div around the php code, but, it sometimes makes things easier. Drupal will automatically give you a div class of something like "region-regionname," but, I usually like putting a div with an id around it (EX:
<div id="footer">) just for my own sake. These divs will be nested as they are in the template.I haven't personally used HTML5 in Drupal 7 (by default it uses HTML 4.0.1, I believe), but, that module certainly looks like a good place to start. Otherwise, I believe that you'd have to copy html.tpl.php from Drupal Core into your theme folder and change the doc type. Alternatively, you could start with one of the existing contributed HTML5 themes instead of Bartik.
Front-End Developer and Site Builder. My portfolio is available on my website
Thanks for your help.
Thanks for your help.
Sandip Choudhury
www.D.SandipArt.com