Answer the question
In order to leave comments, you need to log in
Like in modx revo If else condition inside meta description?
Good afternoon. I want to create a condition if product description is filled, output description, and if description is empty, output parent.description, otherwise output string "This is description" Like
this:
{if $_modx->resource.description == 1}
{$_modx ->resource.description}
{elseif $_modx->resource.description == 0}
{$_modx->resource.parent.description}
{else}
This is description
{/if}
However when I pasted this piece of code, on the html page in meta description = "Empty".
Actually the question itself. How to properly describe all this and embed it in this tag (description)?
Answer the question
In order to leave comments, you need to log in
Print separately
{$_modx->resource.description}
{$_modx->resource.parent.description}
What's in them? expected?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question