Hi,
I have a book page into which I have inserted a block View. Because I am using garland which does not have a top content area, I had to insert the block into the content area. The result is that the post details (author name and date) and the printer friendly icon show up in a clear block above my View block.

I got rid of the author and date (by removing them from admin for all book pages. I did the same for the printer friendly icon.

However, this did not completely solve the problem because I am still left with a clear block of about 40mm between the node title and the View block.

I have tried to use firebug to find what this clear block is and this is what come up in the html section when I select the block:

(node-152 is the node id)

Going one level up, this class is within

How can I remove this clear block.

Thanks very much

Comments

SweeneyTodd’s picture

You could always create a sub-theme of garland and add the an extra region with a top content area where you want it and add the content to it. It is not a hard job, it took me about 15 minutes to do that to a theme yesterday.

Create a sub-theme of garland or whatever theme you want to use (this bit is not included in my 15 minutes as I was already working on a sub-theme which was created by a client).

Edit the theme.info file to add the new region (e.g. region[content_top] = content top)

Edit the page.tpl.php file to add the new region into the correct place (print $content_top;)

Add blocks to new region in blocks page.

Have a beer to celebrate (not included in the 15 minutes).

lilon’s picture

Sounds like a learning curve as I have never created sub themes (or themes, for that matter. Any recommended tute?), but it will probably solve the problem. How do I then assign this subtheme to one particular book page?

Thanks

SweeneyTodd’s picture

Sub-themes are assigned to an entire site (not just one page) but they are useful as they borrow all the original theme information from the base theme (garland in your case) and you only have to specifiy the bits you want to change. It is best to do this to any theme you want to modify (especially if they are core themes) as it will allow you to change bits but still be able to download and update the theme if a new release is issued with any fixes and not worry about overwriting your changes.

Read the Theming Guide (http://drupal.org/theme-guide/6). I am not a person who likes reading the manuals but I found this invaluable and has given me a good insight into how themes work and how to tweak most parts of a display.

A basic sub-theme is just a .info file (in a new folder in the sites/all/themes or sites/default/themes not in /themes) with the heading section and a base theme specified. This will refer to all the template js and css files of the main theme. You can then copy individual files from the main theme over into the sub-theme folder and modify them; css files and js files will have to be declared in the .info file but template files will automatically be picked up and used (you may need to clear the cache as well - see them theming guide for details).

From reading your post, it sounds like the best solution for you would be to add a new region (region[content_top] = content top) so you can put the block where you want it instead of having to put it into a different region and then mess about until it looks how you want it.

Copy the list of regions from your base theme .info file into your new sub-theme .info file. Add a new region (top content) into the list.
Copy the page.tpl.php file from your original theme into the sub-theme and add print $top_content; into your code where you want the block to appear.

lilon’s picture

Your'e an angel.

Thanks so much.