Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Hide Child Pages

Avatar

Level 2

 Please guide me one this use case.

 

I have created  check box as ' Hide Child Pages' under basic tab under page properties .

If this check box was enabled  in at page level  , if page have child pages and those child pages should be hide in navigation  if check box was enabled.

 

Please guide me.

 

Regards

MADHU

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
4 Replies

Avatar

Level 3

Hi @madhu61 ,

It would be helpful if you could elaborate your usecase. Assuming you have a component similar to Navigation where if a page has hide in navigation checkbox enabled, It should hide that page and all the child pages from the Navigation component. In that case please follow the below steps

  1. As you have created the custom checkbox
  2. Go the Navigation component -> Identify the Java logic which implements this list of pages
  3. Add the condition to fetch the page and its child pages only if your property is NOT present on that  page (/jcr:content)
  4. Please try exploring the Navigation component present in the core components which has similar implementation

Avatar

Correct answer by
Community Advisor

Hi,

Use ${inheritedPageProperties.myCustomProperty}

https://sourcedcode.com/blog/aem/aem-quick-reference/aem-inheritedpageproperties-with-sightly-jsp-os... 



Arun Patidar