I have a working page listing items in a block (created by the 'block_view' hook) which when displayed link to another set of pages where I want to list content types associated with them. The items are not standard drupal types so there is no relation between these two sets except through my DB table.

So say I have a link on the original page to mysite/speech/3, and I want to see all speeches associated with speech 3.
To do this I created a block, made it display on speech/* and all is good. I can see the content types associated with speech 3 in a nice table, except it also displays a 'Page not found error' along with the correct data.

  1. Why?
  2. I'm trying to use the Drupal structure as far as possible where I can. When I can't are there issues with using blocks extensively performance wise?

1 Answer 1

  1. You don't have a piece of content at that URL mysite/speech/3, only a block. Don't use a block in this situation, just use a regular page.

  2. Blocks are fine if you can cache them. Does the data change often? If not, set a very long cache and there should very little performance impact.

  • Thanks Jonathan for the rapid repsonse... will look into and get back to you... enjoy your weekend! Jun 1, 2012 at 16:38
  • Thanks for this got it working in the way you suggest. I'm going to use blocks less extensively. I just thought it was the way to do things! I guess you only should use blocks on stuff that is moved around the page or presented in different places on the page. Jun 2, 2012 at 11:03
  • Cool. With Drupal there's always a lot of different ways to do things. Blocks are great for their portability but for a single page of content, perhaps not appropriate. Feel free to accept my answer so that I may win imaginary internet points. Jun 4, 2012 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.