Hello,
I have made a cck custom content type with the following fields:
- my_imagefield (original image that gets resized with imagecache to thumbnail size)
- my_teaser_field: text to be displayed on teaser list (instead of standard teaser)
- my_body_field: text to be displayed if full node
- taxonomy: my_item
I would like to get this format of content:
1. if node is listed in taxonomy:
show resized image + my_teaser_field
(no problem, setting display fields: teaser -> my_imagefield: myresized as link; my_body_field: hidden)
2. if full node (on its own, page view)
show full size image + my_body_field
(no problem, setting display fields: full -> my_imagefield: default; my_teaser_field: hidden)
3. if promoted to frontpage (sort of featured article)
show full size image + my_teaser_field
problem: show *default image* as *link*
how would I solve this display on the frontpage? should I use php (if teaser AND front) or am I overlooking a simpeler setting somewhere?
Thanks for your help
Comments
Html
Could you use html code to create the link in the picture (<a href="destination">)?
Using contemplate and arg(0)
Using contemplate and arg(0)
Using contemplate I themed the teaser and was able to get the full img as link to the node when viewing the homepage at www.example.com and at the full node (not themed) at www.example.com/node/nodeid.
However, then I lost the img when viewing the taxonomy listing at www.example.com/taxonomy/term/termid. The themed teaser expects the image to be at www.example.com/taxonomy/term/files/myimages/myimage.jpg, however the img is stored at www.example.com/files/myimages/myimage.jpg
So, I needed different paths to the img depending on the page I'm on: if I'm viewing taxonomy I should loose the '/taxonomy/term' part of the url...
So I used the if(arg(0)=="taxonomy" to get the right image
Is this the right way to use theme(etc,etc)?