Drupal Tips Monday: Make CCK Nodes Look a Little Prettier
Being inexperienced with the ways of PHP and hardcore Drupal modification, I needed to do one simple thing, make my CCK node title all H3 headers.
It took lots of head banging to figure this out.
There are Drupal modules that can supposedly template a CCK node, such as Contemplate. After days of messing with it, I could not figure out how to use it.
Frustrated I decided to poke around the CCK module code and discovered a quick work around. All I needed were CCK node labels to be printed on the page as H3 headings. Turns out I could do this easily by editing one simple line of code in the CCK template theme files.
In the CCK file modules/cck/theme/content-field.tpl.php there is this line of code:
[code lang="php"]
[/code]
All I needed to do was wrap the label in the H3 tag. Like this:
[code lang="php"]
:
[/code]
This simple little trick displayed all my CCK Node Label Headings as H3 headers and it looks great. It breaks the content on my page perfectly and creates a better reading experience.


Could you please explain CCK for us less smarterized in the mighty ways of Drupal
I plan to do a whole series on Drupal and it’s esoteric range modules, including CCK. Stay tuned.