Welcome to Geeklog, Anonymous Monday, December 23 2024 @ 06:48 am EST
Geeklog Forums
Different backgrounds for various blocks
Earnest
TIA!
Dirk
bye, Dirk
beewee
What would be required to make Geeklog allow us to use different backgrounds for individual blocks? On some blocks I do not want a title to display. I may simply wish to include an image. For others I may wish a title and a different background color. Is this at all possible?
TIA!
I'm using a block template called 'blank' for several years, couldn't live without it...
If you only want to give blocks on one side a different background, change leftblocks.thtml and/or rightblocks.thtml since they give the all blocks on that side a different background color, and give all blocks a transparent background.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
HughJohnson
beewee
You can use the {block_id} as a css class or id inside of the block template file, and change the backgrounds via your stylesheet. There can be issues with special characters but if your careful about how you choose your block id's it works great.
I didn't know that {block_id} actually worked as a theme variable? Tried it once in GL 1.3.11, and that didn't work so I used the old Chameleon plugin instead.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
Dirk
You can use the {block_id} as a css class or id inside of the block template file, and change the backgrounds via your stylesheet. There can be issues with special characters but if your careful about how you choose your block id's it works great.
If you're referring to {blockid} (no underscore) - that was removed in 1.5.0rc2 (and never was available in any final version):
from the block title, resulting in layout changes when you changed the block
title. It also didn't work properly with non-ASCII languages. Updated
style.css and the block templates accordingly
bye, Dirk
HughJohnson
You can use the {block_id} as a css class or id inside of the block template file, and change the backgrounds via your stylesheet. There can be issues with special characters but if your careful about how you choose your block id's it works great.
If you're referring to {blockid} (no underscore) - that was removed in 1.5.0rc2 (and never was available in any final version):
from the block title, resulting in layout changes when you changed the block
title. It also didn't work properly with non-ASCII languages. Updated
style.css and the block templates accordingly
bye, Dirk
Ahh yes I see now the site I used it on is still running "Geeklog 1.3.12cvs". I guess now I am glad I never upgraded it (It's not used for much).
Just curious but why was the blockid removed?
Dirk
I've already quoted the reasons for the removal above: It wasn't the real block id but a fake one based on the block title. So changing the block title (manually or automatically, e.g. by switching the language) could affect your layout. Plus you could end up with an empty id in non-ASCII languages (e.g. Japanese).
It simply wasn't usable in the real world.
bye, Dirk
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content