I decided to have an image on my customized content type node.
What I need:
To be able to display the specific image linked to the customized node, which is essentially is a product description. The image is to be uploaded by user(s) and then displayed on the product description page in the certain position customized by contemplate.
What I've done:
Uploaded the image using CKK Filefield and ImageField modules. In order to place image in the certain position on the product page template using contemplate module I tried to get handle on the image based on the node id, but not sure, how to do it?
One way of doing it I thought would be to save the image to the specific directory: files\nid\filename. For that purpose I added the following piece of code to field_file.inc thinking that filepath variable is taken from the string below, so I've added $nid to it.
$file->destination = file_destination(file_create_path($dest .'/'. $nid .'/'. $file->filename), $replace);
It didn't work.
Now, I am not sure, where this filepath gets setup or perhaps there is an easier way of connecting images and nodes?
Comments
any response ?
Does anybody solved this problem ? It could be a nice feature.
Thanks