0

I created a block which displays several type of content. On the page of Country, I have a block which has a list such as:

  • Anthem
  • Flag

To be able to do this, I addd a filter in the Advanced column. I don't know if it's the best way, feel free to tell me if there is a better way to do it. Well, this is what I have after this modification:

  • Anthem of XXX
  • Flag of XXX

As you can see, this is the right list. There is one type of Anthem or Flag. This is the other half of the issue, I don't know how to not let the flag to be chosen on the formula of a Country if it has already been for an other one. So, in the list, how to display the type of the content and not the title such as on the first list.

Thanks :D !

UPDATE: this are the screenshots of what I did and the result I have: enter image description here enter image description here

I want to add other types of content but I didn't find how to do.

  • Need more Info / screen shots, seems you have made a view and gave an argument of the content id, so really the answer is in your view check FORMAT "Show" select "fields" then in the FIELDS click add and add the Content type field. please update your question as very hard to follow exactly what your desired outcome is. – Taggart Jensen Feb 5 '18 at 3:29
  • First of all, I thank you for the answer. Although, I don't know where is the FORMAT place you mentionned. Could you please tell me where to find it? PS: I added the screenshots you asked for (: ! Waht I want to do is to not display the title such as "Anthem of Australia" but a personalize text with the same link: "Anthem". I want the link to depend on which Country page I'm on. – Helmasaur Feb 5 '18 at 8:32
  • If you set Set Drupal to english for a few seconds and go back to the view you will see it :) – Taggart Jensen Feb 6 '18 at 0:09
1

Assuming you are trying to add a personalized text that links to the anthem of the country.

To achieve this, you can add a global text field and rewrite the output.

Step by step:

1) Add the field "Link to content" and fill out your personalized text in the box that says "text that will show". Check the box "exclude from display."

2) Select your title field and check the box "exclude from display."

3) Add the field "custom text" (category global)

4) In the text field, add the token as seen in replacement patterns below called "{{ view_node }}" for the link to the content.

5) Save it all and you now have a link to the content of the current country page, assuming you have set up the right contextual filter.

If you are trying to achieve something else, please clarify and let me know.

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