Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Can anyone tell me if there is snippet or an easy way to get all the links under the same parent as the page selected?
Hi Yaco,
What exactly do you mean by all the links?
Are these child pages or links added by a multiUrl picker?
Sorry for not being clear. I mean child pages.
I created 3 main sections and each has 3-5 child sections.
Here is an example of what I have and what I am looking to do.
PARENT SECTION 1
PARENT SECTION 2
PARENT SECTION 3
If the use is on Child Section B2 I want the script to return all the pages at the same level as Child Section B2
Hi Yaco
You could use .Siblings() or .SiblingsAndSelf()
Depending if you want to include the page you are on as well...
The razor cheatsheet is good for discovering things like this...
https://docs.umbraco.com/umbraco-cms/fundamentals/design/templates/razor-cheatsheet
Regards
Marc
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Best way to get all the files in the same level?
Can anyone tell me if there is snippet or an easy way to get all the links under the same parent as the page selected?
Hi Yaco,
What exactly do you mean by all the links?
Are these child pages or links added by a multiUrl picker?
Sorry for not being clear. I mean child pages.
I created 3 main sections and each has 3-5 child sections.
Here is an example of what I have and what I am looking to do.
PARENT SECTION 1
PARENT SECTION 2
PARENT SECTION 3
If the use is on Child Section B2 I want the script to return all the pages at the same level as Child Section B2
Hi Yaco
You could use .Siblings() or .SiblingsAndSelf()
Depending if you want to include the page you are on as well...
The razor cheatsheet is good for discovering things like this...
https://docs.umbraco.com/umbraco-cms/fundamentals/design/templates/razor-cheatsheet
Regards
Marc
is working on a reply...