By rivena on
logintobbogin's log in block. Bookmark's my bookmarks block. Userpoint's my points block. doitsumo, koitsumo. I would like to combine all of this into one block... Does anyone have any ideas for putting blocks in blocks?
Anisa.
Comments
add a PHP block, ie. a block
add a PHP block, ie. a block with input format "PHP code", and enter something like this into the block body:
if you want to display blocks with a delta other than 0, you have to elaborate a little and pass the delta as 4th arg to
module_invoke($module, 'block', 'view').Combine blocks in drupal 5?
Hi,
I want to combine two blocks into one to get my lay-out looking as I want.
Preferrably side by side..but the first challenge is to get two different blocks shown which I can choose at front.
I tried above in my own situation.
I got 2 blocks back so that's ok.
I don't know why exactly these block, may be it has the lowest delta..
Did somebody allready build such combined block, may be with delta working so you can set exactly which blocks to shown?
Next to this how can I show the blocks horizontal instead of vertical?
Thanks in advance!
greetings,
Martijn
two blocks in one block
Hi,
After a couple of hours serving the internet and thinking for myself I found the following solution.
With this flexibel customer-block you can show different blocks in one block.
I have to find out how to show these blocks horizontal instead of vertical.
I know it is possible with css, but may be somebody knows a solution with a module or system-setup?
Greetings,
Martijn
how to reference user blocks?
Thank you for the great tip. Works for me for "search" block, but what about for a user-defined block? I've tried "block/1", "block-user-1" etc... no dice. I call the block "content-headings" but that doesn't seem to hold any bearing either.
--
http://drupaltees.com
80s themed Drupal T-Shirts
just blocks
Hi,
I think you have to look in your DB table blocks.
There is the module stated. For user defined it should be "block" or "blocks" because the block.module builds the custom-block (I am on holliday so can't reach my database, sorry :(
The delta for user defined is a number, so but the number between brackets. For example "1".
That should do it for you. Please report back if it works.
Greetings,
Martijn
with your code it works
Martijnhaan-
Thank you for your reply-- yes, it works with your code :) (I had tried it against the original snippet above and no dice).
To get these combined blocks to flow side-by-side in my header, I added the following css to style.css:
which reaches down into my custom block (block-module-delta) into each contained block's .content area. Then I had to clear the float before continuing with the page, so I added a custom block-block-3.tpl.php (based on block.tpl.php) that looks like this:
without the php tags of course-- they're here for forum code coloring. Also, notice I popped off the header tag for this block.
There is likely a better way, and I'm not sure why display:inline didn't do the trick (maybe b/c both .content's contained block elements?).
--
http://drupaltees.com
80s themed Drupal T-Shirts
Float and display
Hi,
I will try your code when I am home. I am now on holliday.
What I read about float and things like display:inline that it doesn;t work together.
The float element is not to use in compare with a lot of other .css elements.
But I can't figure out another element which does the trick (for 90% in my case).
may be 100% if I use your code. I will report back after the 15th of august.
From spain.
Muchos gracias!
Martijn