By chason on
I've created a block to hold a caption on my home page. I've created a region to define this block. Now, I want to be able to login to Drupal admin, create content of type page, and associate that specific page/node with the caption block on my home page. I'm completley stuck and have an increasingly irate client. ANy help is much appreaciated!!
thx,
Paul
Comments
Block content
Hey Paul
Do you need the content of the block to be from a page?
It is very easy to put text into a block (in the configure page for the block). Can you just edit the content of the block when you need to change it?
If, for some reason (perhaps edit permissions), content has to come from a node, you could set the input format to php and the content as:
...replacing 101 with whatever node id you want.
Peter
Views
1. Create taxonomy term "whatever".
2. Create content and assign it to the term "whatever".
3. Create a view for "whatever" via the Views module. You can tell Views to provide a block, give the block title, intro and footer text, etc.
4. Go to Blocks, configure and activate the block provided by Views.
5. Position and style the block via CSS.
6. Smile.
:)
Just what I needed
Thanks to both of you for the insight. Petermarks, I was able to easily integrate the code you provided. Man, I wish there was a white paper somewhere that described Drupal's available methods in an easy to digest way. Unfortunately, i've been scrambling through drupal.org to try and figure out the framework, variable scope and so on. I still have a very vague understanding of how/why this system was designed the way it is. If anyone out there can point me to a resource that explains the thinking involved in Drupal's design, that would be extremely helpful. I feel like I'm not taking advantage of all it has to offer, thus I've been slinging custom functions throughout my tpl files to get this thing working how i need it to.
browse the APIs
The API site provides a very good reference: http://api.drupal.org/
Also, the previously mentioned snippets section: http://drupal.org/handbook/customization/php-snippets
However, I don't think there is a single document that does (or could) encompass the whole framework.
---
Work: BioRAFT