Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Is it possible to create a list component that evaluates multiple paths and tags?

james-mke
Level 2
Level 2

We have received a development request to build a component that evaluates assets in the following way:

 

DAM path A OR DAM path B

AND

Tags X, Y, AND Z

 

So that whenever the tags are found on an asset in either of the path locations, the asset will appear in the list.

Is it possible to have a list component behave in this way?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution
Shashi_Mulugu
Correct answer by
Community Advisor
Community Advisor

Yes @james-mke we can create a component with the said requirements.

 

Basically its an and condition between tags field and path field(which has or condition in between)

 

Can be achieved using query builder.

View solution in original post

2 Replies
Shashi_Mulugu
Correct answer by
Community Advisor
Community Advisor

Yes @james-mke we can create a component with the said requirements.

 

Basically its an and condition between tags field and path field(which has or condition in between)

 

Can be achieved using query builder.

View solution in original post

Manjunath_K
Community Advisor
Community Advisor

Hi @james-mke 

We can fetch the matching asset using Query Builder as mentioned below (example where Product A asset is tagged with product id "product-1331" , Product B is tagged with product id "product-1221" & both assets are under different root path). you can change OR & AND condition between tags based on your requirement.

 

Query Builder Result :

asset.PNG

 

Query :

property=cq:tags
property.1_value=test:product-1331
property.2_value=test:product-1221
property.or=true
group.1_path=/content/dam/test
group.2_path=/content/dam/images
group.p.or=true

 

 

Hope this helps!