By soezkan on
Hi there,
I have an page-node and an image-node which shall appear
within two different blocks, like left-sidebar and the other one
in right-sidebar.
How can I manage this? With views? Or is it easier?
I guess I have to "convert" a node into a block to do
so?
Thanks a lot for help!
Cheers,
Soezkan
Comments
try..
..a php include() in the block
Thanks for replying. But
Thanks for replying. But isn't there an "easier" way to do that.
I think I don't want to fiddle around with php.
Any other idea?
Hmm..
Note sure if there is an easier way, you could use Views to create a view then call that view into your block using your good friend PHP!
But how can I bring some PHP
But how can I bring some PHP code into a block?
Thanks for more help!
:) soezkan
just go..
..edit/block in admin and select input format then select PHP
No need
There is no need to use PHP to put views into blocks. Views does that.
You mean..
..you can expose a view in a block but how do you print it?
enable the PHP filter module,
enable the PHP filter module, site building > modules, you need to grant permissions to yourself after enabling it.
if you need to print a view in a block:
# = the id of the block, say 3
http://www.tecito.com
as noted below. if you use
as noted below. if you use views: create the view, create a block display for the view. put the block in your sidebar in the block configuration.
CCK Blocks
Is the cck blocks modules what you are looking for? http://drupal.org/project/cck_blocks
Thank you so much for all the
Thank you so much for all the replies!
What I actually want to do:
Supposing I have four page-nodes.
All of these nodes shall appear in the content-block.
Assuming a visitor chooses the first page-node from the menu,
then in the right-sitebar an image shall appear.
But the image shall change as the nodes-change, which means:
If somebody chosen node/1 the image green.jpg shall appear
beside, if one chosen node/2 the image called red.jpg shall
appear.
Then...
..You will have to use PHP for block visibility, do a search for block visibilty to help you out with this.
are the images saved in
are the images saved in relation to the node? then go ahead with imagefield and cck blocks.
alternatively you can use views and node reference for example. i would try to avoid php in the block code as often as possible.
there are many possible ways to accomplish such a goal without writing a single line of php. :-)