By neoian on
I was a wordpress user, but I am starting to expirament with other things like Drupal. I have been working with it for a couple of days and still have yet to find a solution to my problem.
I have a website that I am setting up with product pictures. I would like to have the value of a custom field displayed within my template so I could do something like:
<img height="FIELD1VALUE" width="FIELD2VALUE" src="FIELD3VALUE" />
Is this possible with drupal?
Comments
CCK
Yes, create a custom type and add whichever fields you want. Then use Views
http://drupal.org/project/views
to display them on their own page or within a block that you can position wherever you need. CCK is built in to 5.x but views you'll need to install manually.
For the image in particular, download the image CCK image field, a link to which you will find on the main CCK page.
To learn more, search for CCK (Content Construction Kit) using "CCK site:drupal.org" in Google.
Good luck and be prepared to do a fair amount of reading ;-)
Andre'
Module approach
You may want to look into utilizing a combination of modules to get your desired output.
I'm not sure exactly what you're trying to get as your final output, but there are many modules which allow for image placement and display. Take a look at the modules section of the site. http://drupal.org/project/Modules
Generally speaking... the width, height, title, and src values are populated through Drupal by utilizing any of the many modules for images. A few to check out are the following:
http://drupal.org/project/cck
http://drupal.org/project/imagefield
http://drupal.org/project/imagecache
Hope this helps,
JK
thanks
Thank you. I can see myself using drupal in all my new projects now!