D
D
Denys2017-07-19 18:32:12
Drupal
Denys, 2017-07-19 18:32:12

How to display a tag through "views" (view)?

I'm trying to display the markup tag

<link itemprop="availability" href="http://schema.org/InStock">
if the product is in stock, or display the opposite if it is not. I have a condition in rewriting the results, in a text field in which you can use html, but as I understand it, the list of tags is limited and the tag is not perceived. How to remove this restriction for views ?fE34VBIYScaEyyAkaFNwjg.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Olga Svistunova, 2017-07-20
@BlackBride

In a good way, no way. I won’t teach bad things, I’ll just leave a link to the module and say that using it is VERY VERY bad and never the Drupal Way.
In general, it’s better to pull this out of the view into the template, and there you can already sort out everything you need with the code.
And it's even better not to play around with fields, but to use Custom Formatters , but that's a completely different story about optimization and caching...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question