By jochenh on
hi
i am wondering if it is possible for blocks not to display their title. ( i have a bunch of custom ones and I would rather have an image with text)...
so where do i turn that off ?
i tried renaming them all to "" but this seems to create duplication issues in the database...
help would be appreciated!!!
- jochen
Comments
in style.css
In your theme's style.css you can set the title of the blocks not to display
eg.
#sidebar-left .title {
display: none;
}
Best regards,
Lennart
Best regards,
Lennart
Make the titles into comments
Just name them something like:
<!-- MyBlock -->
I'm not sure though. I read this somewhere in the forums. Can't find the post though. I know it works for menus.
Although there are several
Although there are several workarounds for keeping titles from displaying in blocks, I don't understand why there isn't a check box to toggle the stankin thing on or off.
This has got to be one of the most frequently asked questions on this site, and it seems that it could be addressed with a simple check box in the admin form...
[x] Hide title
If checked, the title will not be displayed in the block.
The CSS trick works, but unless you want all box titles hidden, and not just some, you have to go view the source and find out what the id of your block is so you can put a css rule for that one box, and even them you really only hide it for css capable browsers, it's still there.
Blocks by nature are supposed to serve a wide variety of purposes and the pervasive title issue seems to try to force them all to be the same kind of thing.
I probably wouldn't care but I have way too many
display: nonerules clogging up my css sheet when they shouldn't. CSS is to control presentation, and this is an issue of content. I don't want a title because I don't want it in my content, not because I want it there but I don't want anyone to see it.-zach
------------------------
harkey design
: z
still confused...
sorry, i am not that good at css. so i have tried adding all kinds of permutations on the css fix but it's not working. here is the source of the page:
so what should my css statment be to turn the h2 element off...?
thanks so much for the help!
- jochen
Try this...
-zach
------------------------
harkey design
: z
thanks that worked!
thanks that worked!
Is there anyway to have 2
Is there anyway to have 2 blocks with the same name?
I have a site where I want to have a "Sponsored Links" tower from Gogole both on the left and right on some pages. For now, I just hardcoded one into the template itself.
Make the block description
Make the block description for each block unique. I believe the block name is generated from that. If there is no description, it uses the block title.
-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
I've tried that, but it
I've tried that, but it doesn't work. I'm running 4.6 at the moment.
For #1, in the description, I wrote Sponsored#1.
For #2, in the description, I wrote Sponsored#2.
Then, for the block titles, I tried to name both of them Sponsored Links, but only one of them works.
Also, I tried inserting html code above the adsense code, without a block title but it doesn't look right.
Any other suggestions or
Any other suggestions or options?
My suggestion
It seems ridiculous my suggestion, but what do you think of to name one block as "Sponsored links" and other block as "More sponsored links"? Sometimes the best way is to be pragmatical.
No
I thought of doing some little variation of that, but I would like to keep it consistent.
add a comment to the end of the title
Add a comment to the end of the title for the second one:
Should display as:
Sponsored Links
Scott
White Paper Designs
HTML Comment Entitites are broken in newer 4.6.x
Unforutnately 4.6.x (not sure which point release) has broken the use of CSS or HTML code in a title - INCLUDING HTML comment entitites. I used to use this method - then upgraded from 4.6.0 to 4.6.5 (silly me) - which caused all my block titles to become a problem...
Turning off Block Titles
Hi,
We're looking at making the shift from Mambo driven sites, and mostly all is going well...
I am in the same position, wanting some blocks with headers, and some without. Don't really want to have the hack the file every time as its a little un-dynamic and seems like a step backwards. I tried the commenting but ended up with title with
in them.
I tried not entering a title, but the
tags remained and thats not a good look for code validation.
any other answers?
Thanks a lot, I've heard this is a very good community,
Nat
Decisive Flow - How People Choose You
4.7 allows better title control
NAT - the 4.7 allows much better control over the block title now. In 4.7 code, you have the ability to set the "Title" which is what gets displayed - this can be unique, non-unique, or blank as you choose, and also set a unique "Description" which must be unique for each block. Drupal 4.7 code now uses the "Description" to track and manage the block internally - not the actual "Title".
I know 4.7 is beta still, but it might be worth starting to use it if - you have some lag between now and when you want to go live. Only downside, is modules for 4.7 are behind the curve - however a number of them in the CVS repository work with the 4.7beta releases.
4.6 code still doesn't allow much in the way of flexibility in titles. In fact, from 4.6.x (not sure which point release), there has been a significant step back - in that you CAN'T use HTML Comment Entities to make a title unique and disappear all together if you wanted to. That seriously pissed me off... But, I understand it's something to do with preventing Cross Site Scripting or similar potential issues. My opinion is that's just plain silly, since as an Admin I control my block titles - it's not something users have control or access to - barring any bugs in the code.
Good Luck!
Where is that?
How do you turn block titles on and off in 4.7? I can't find it for the life of me.
Thanks
In 4.7 you can just leave
In 4.7 you can just leave the "Block title" field blank and no title will be printed.
Personally, I think the description should be appended to point this out.
-zach
------------------------
harkey design
: z
Well I have the block titles
I have the block titles in the setup of the block but none of them are showing. The block code appears to allow for the block title and I have seen this theme 'Mollio' display them. But I can't find any clue as to why they don't show. I also can't find the Primary and Secondary links, they were there but now they don't show in any theme.
If anyone knows what is going on please, please, please. I am going crazy. Stayed up too late last night trying to figure this out!!!
thanks
BTW - the link you provided throws a 'page not found'.
Perhaps here:
Perhaps here: http://drupal.org/node/57649
Primary and secondary link behavior changed in 4.7
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
<?php print $block-subject
<?php print $block-subject ?>in your block.tpl.php should print out the "Block title". Make sure to view the source code of the output to your browser. It very well could be there but you have some tricky css rule that's hiding it (e.g. display: none; or text-indent: -9999px are the rules that always get me).-zach
--
harkey design
: z
Hiding block titles
Hiding block titles
hiding block titles (Prior to drupal 4.7)
Hello everybody,
Here is how I have managed hide my titles in drupal 4.6
Basically, I told my template not to show the module title if it contains one or more white spaces at its beginning.
I was using phpTemplate, so I have copied the default file named block.tpl.php from the /themes/engines/phptemplate folder. Then, I have change the file from this :
to that :
Live long ... and prosper!