V
V
Vladimir2015-06-07 12:22:28
Drupal
Vladimir, 2015-06-07 12:22:28

Drupal 7! How to put two fields in a link?

I display the field (image) as a link to the material, and I would like to display the (title) of the material inside this link.
Now it looks like this:

<div class="views-row views-row-1 views-row-odd views-row-first">
  <div class="views-field views-field-title">
     <span class="field-content">Судостроение</span>  </div>  
  <div class="views-field views-field-field-iconki-tehnika">
     <div class="field-content">
     <a href="/content/sudostroenie"><img typeof="foaf:Image" src="http://kampo/sites/default/files/default_images/pr-img-1.jpg" alt=""></a>
     </div>  
   </div>  
  </div>

And you need it like this:
<div class="views-row views-row-1 views-row-odd views-row-first">
           <div class="field-content">
     <a href="/content/sudostroenie"><img typeof="foaf:Image" src="http://kampo/sites/default/files/default_images/pr-img-1.jpg" alt="">
           <span>Заголовок</span></a>
     </div>  
   </div>  
  </div>

That is, it turns out that the title of the node needs to be displayed inside the field (image) which is a link to the node, I know what to twist (overwrite the result) well, I don’t understand what needs to be inserted. Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
andead, 2015-06-07
@andead

Add the nid, title, image
fields Add the Global: Custom text field, write the text: [field_image][title], enable the Output this field as a link option, write the link address node/[nid]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question