By polutan on
hey everybody :) i'am very newbie in Drupal. I've to learn making new module from scratch. The question is, how to just fill _block hook in a block without making new module. is it possible? So, i no need configuring menu from administer, no need submitting. I Just need showing some data in the rightsidebar for example.
Thank you :)
Comments
For that to work, you really
For that to work, you really do need to make a module, with a .info file and a hook_help. It's easy.
BUT
a short-cut I'm using is to make a normal block-block using the block administrator and using it as a placeholder for my real code.
- create a normal text block block.
- Add text to it called just PLACEHOLDER
- Place that block on your page, and find out its ID. eg, block-block-3
- create block-block-3.tpl.php in your theme
- You CAN copy the contents of block-tpl.php to give you a start there, but it's not required.
- instead, just go wild with your code there
block-block-3.tpl.phpYou can do most of what you want there, although there are a few limitations, and the code runs quite late in the page-build process, it's pretty good for many smaller-than-module-sized code things.
... Or you can try doing it in the php field of the block editor, but that's not much fun to edit.
.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/
.dan. is the New Zealand Drupal Developer working on Government Web Standards
thank you! awesome!
woww awesome! thank you dman :) very very thank you ! your solutions works! Now i can create a block without making any module first. And now i'am so happy coz now i know mean of block actually :D
thanks bro.. :)