I've got these two content types, A (2014) and B (2015), I'm tryging to combine in a view but content A needs field to view node and content B to edit node,

The view show the fields but it show both options edit and view for all contents.

My actual view my actual view

The view I would like to do Planing to do

  • I'm not sure if I understand the question; could you explain it a bit more? – Aram Boyajyan May 13 '15 at 11:26
  • Basically is how to display a field with a condition if content type is A display view link and if content type is B display edit link.. – user3415054 May 13 '15 at 11:37
  • Welcome to Drupal Answers. If you want to give more information you are supposed to edit your question. This site is not meant as a forum, so don't expect comments to be seen by users judging if your problem is worth their time. – Free Radical May 24 '15 at 4:36

For things like this I use Views Conditional.
Work with the replacement variables and hide unused content.

  • Nugorra, this module save my day, I manage to do this with Views Conditional, working pretty good. – user3415054 May 13 '15 at 21:54

Views Conditonal solved my problem

if content type A

<a href="node/[nid]/edit">2015.................................[edit_node]<span class="read"></span></a> <span class="read" style="margin-left:100px; text-align:right">[percentage]</span> 

if content type B

<a href="node/[nid]">2014................................[view_node]<span class="read"></span></a>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.