I have a Drupal website in which there is a content type named Article. In that content type, there is a taxonomy field called "Topic" which is term reference field pointing to a vocabulary called Topics.
Example article URLs:
mysite.com/topic-term/the-article-title i.e mysite.com/books/100-days-around-the-world or mysite.com/culture/chinese-and-medicine
Every article has a main image field called "image". The problem starts from here.
I want to style the main image for the articles classified under the term "books" differently; i.e., I want the image to have greater height than width.
The only way that I could think to do that is to make a new view for it. I tried to make such a view, but it only rendered the first article of books. The following screen shot shows the View settings:
The real problem, indeed, I don't know a view that render the articles content page! When I contacted the theme author, for previous modification request, they told me to do it by coding in
node--article.tpl.php! So I have only two ways:
- Creating a view that could be able to render articles by the access way described above
- Using code in
node--article.tpl.phpthat set conditionally a style for the field image if the article topic term equals to books.
I don't know how to get what I need using the two approaches.