S
S
sorry_i_noob2019-08-17 22:44:12
MODX
sorry_i_noob, 2019-08-17 22:44:12

On the product page, the cards display not only products, but also categories (they have a different template). How can you determine what is output?

Hello!
On the Modx site page, not only products are displayed, but also categories (look: "SIP panels", "Front flexible stone", "Interior stone"). The cards are the same, but the entities are different. I want to hide the price div for the category card since it doesn't need it.
To do this, I must put a condition in the chunk - what exactly is displayed: a category or a product? And if the category, then DO NOT DISPLAY the price.
How do I determine what exactly is displayed - a product or a category?
I am attaching a picture to make it clearer.
5d5858f8f2bf9231478925.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2019-08-18
@dimonchik2013

if the ID does not differ in any way, then only mentally

B
bochkarev, 2019-08-18
@bochkarev

If pdoTools is used, you can use the &templatesList of templates parameter, separated by commas, to filter the results. If the template id starts with a hyphen, resources with it are excluded from the selection.
Read more: https://docs.modx.pro/komponentyi/pdotools/obshhie...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question