Hi Everyone,

I'm new to Drupal but working with some experienced developers. I've been tasked with skinning a story so it looks... well... good? Let's say for example there is a URL at the end of the story to "add to favorites"- which there is- they have it working- but it looks like crap. I would like to have an image hyperlink instead of just the text hyperlink. How in the world do I do this? the node-story.tpl.php simply outputs $content. Is there a way to get the individual elements in the template, and apply CSS classes/html formatting to them?

Dazed and confused- help would be greatly appreciated.

-Christian

Comments

WorldFallz’s picture

See Overriding themable output in the theming documentation for more info.

TheCakeIsALie’s picture

Thanks for your reply, from what I can tell though, story is a type of content and not a module. There is no module code to copy and modify. I am confused is there any other advice you can give me?

WorldFallz’s picture

All the info you need is in the theming guide but basically the process is to copy the appropriate tpl.php file to your theme's directory and alter as desired. That's the simplest way anyway. You've already created node-story.tpl.php you just need to specify whatever output you want (be sure to keep a base node.tpl.php in your theme's directory as well, or the derivatives won't be detected). See http://drupal.org/node/348916 in the theme guide for some basics. You can also see the comment in the base /modules/node/node.tpl.php for the default variables, but the modules you use will frequently add to this. Then, as with any website, you can style the output with css.