0
votes

I have a Repeater with Custom Query. Currently, there's a WHERE Condition like this PracticeAreas = '{%CurrentDocument.PracticeAreas#%}' and NodeID != {%CurrentDocument.NodeID#%}

The purpose is to filter and show only documents that have the same PracticeAreas as the current document, and it works fine. Now, in addition to the PracticeAreas, I also want to filter and show only documents on the Current Site. How do I do that? Thanks!

2

2 Answers

0
votes

The correct syntax for your WHERE condition would be:

NodeSiteID = {%CurrentSite.SiteID%|(default)1}

You always want to provide some sort of default value as well to ensure you keep your query safe and functioning in the event a value is not provided.

0
votes

A bit depends in nature of your query, but to retrieve and filter site, you will need SiteID. For that, you can use macro as well so something like:

SiteID = {% CurrentSite.ID #%}