By Etw on
Hi,
I've taken over the maintenance of a drupal system that seems to be using blocks in a bit of an odd way, as the main content holders on the main page on a small project status site.
I've had a request to show the date the blocks were last updated, but looking through the code/documenation it appears this data isn't stored for blocks. Can anyone point me in the direction of any modules/hooks that I could use, or any other suggested ways of doing this?
Thanks.
Comments
>using blocks in a bit of an
>using blocks in a bit of an odd way
Well yes, other people's usage of certain features is never quite the same as one's own :-P !!
You're right, custom blocks are stored in the {boxes} table and there is no timestamp associated with them.
What you could do is use ordinary nodes to contain the block content, and then either programmatically get the block to pull the node content using PHP code (not the tidiest way, though you could put the code in a custom module and then just call the relevant routine), or use Views to make the blocks in question. This would enable you to configure how the node is displayed exactly how you want from the UI.
gpk
----
www.alexoria.co.uk
Thanks for the suggestions.
Thanks for the suggestions. Will have a play with the views module for now, and look at redoing things a more standard way when i get time to redo the mess i've inherited.
>a more standard way Using
>a more standard way
Using nodes and a Views block are the most standard way I can think of... no coding required ... there might also be another contrib module that lets you display a node as a block but you'd probably need to create block templates to get the block displayed the way you want. With Views you can customise all this from the UI. :P !
gpk
----
www.alexoria.co.uk