It's it bad technique to use a block on one page

Hello Drupal Folk,

I am just creating a drupal site and had a thought cross my mind.

Is it good or bad etiquette to use a block on drupal if it is only being placed into one page?

I'm going to do that method to put something in the sidebar, but interested to know if that would be frowned upon by those in the big leagues.

Have a ponder and let me know your thoughts.
Cheers

It's a website. Do what you

ryivhnn - September 17, 2008 - 04:57

It's a website. Do what you want how you want as long as you're not writing too much non-compliant spaghetti code to do so ;) That is my opinion and I'm sticking to it :P

No problem

Drupalace - September 18, 2008 - 03:37

I don't see why a block on a single page would be intrinsically good or bad. If you have a need for some info to appear on only one page, and a block makes sense for its presentation, then go for it!

This is probably very common, actually - particularly, blocks appearing only on the front page. A welcome message, status message, etc. might be a good example.

--------
Easy Drupal Admin Manual, Drupal questions, other stuff for the newbie: http://www.drupalace.com

Generally yes. Specifically? how many?

dman - September 18, 2008 - 04:14

One block on one page, of course, not a problem!

12 blocks doing similar things on 12 respective pages? You need to re-think your approach, eg http://drupal.org/project/sidecontent

Or for a several-to-several relationship, a bit of php logic may be more advanced.

.dan.
if you are asking a question you think should be documented, please provide a link to the handbook where you think the answer should be found.
| http://www.coders.co.nz/ |

It was more just a general interest question

Sheedz - September 18, 2008 - 11:36

Cheers for the replies.

I've just been using the one block method, but had a pondering as to whether it would be better for future works to follow another route to be a "good" coder.

I know it's not the end of the world using the block, but just interested to hear your thoughts and if you opt to do it in another more efficient method.

thanks

you may wanna check out

nirvanajyothi - March 23, 2009 - 10:20

you may wanna check out blockreference module http://drupal.org/project/blockreference

It can be used to display the 'Disabled' blocks too

 
 

Drupal is a registered trademark of Dries Buytaert.