How to get content from two different paths

Duncan Koza asked on April 17, 2020 23:30

Is it possible to target two paths with a repeater?

In the path field I currently have: /About-Us/News-Events/News/%

But, I want to get the content from a second area /About-Us/News-Events/PresidentsMessage/%

What if I click on the little arrow beside the word Path: ?

Thank you.

Correct Answer

Brenden Kehren answered on April 18, 2020 00:10

Yes. Set the path property to /About-Us/News-Events/%. Then in your where condition set this value NodeAliasPath LIKE '/About-Us/News-Events/News/%' OR NodeAliasPath LIKE '/About-Us/News-Events/PresidentsMessage/%'.

This should get you what you're looking for

0 votesVote for this answer Unmark Correct answer

Recent Answers


Duncan Koza answered on April 18, 2020 04:11

I already have a value set in the where condition field.

(SpotlightStartDateTime <= GetDATE()) AND (SpotlightEndDateTime >= GetDATE())

Can I continue using this one and just add the one you provided?

Example 1 NodeAliasPath LIKE '/About-Us/News-Events/News/%' OR NodeAliasPath LIKE '/About-Us/News-Events/PresidentsMessage/%' (SpotlightStartDateTime <= GetDATE()) AND (SpotlightEndDateTime >= GetDATE())

Example 2 (NodeAliasPath LIKE '/About-Us/News-Events/News/%' AND ((SpotlightStartDateTime <= GetDATE()) AND (SpotlightEndDateTime >= GetDATE()))) OR (NodeAliasPath LIKE '/About-Us/News-Events/PresidentsMessage/%' AND ((SpotlightStartDateTime <= GetDATE()) AND (SpotlightEndDateTime >= GetDATE())))

I am thinking that my example 2 might be the correct one, at least when I tried it, my web part didn't crash. Did I merge the two correctly?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on April 18, 2020 04:14 (last edited on April 18, 2020 04:14)

Yes, wrap the condition I have on parentheses then place an AND statement between that and your other statement.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.