Posts

Showing posts from 2021

Get the DAM Asset meta data in AEM

 Get the DAM Asset meta data in AEM Using Sling Model @Model(adaptables = {SlingHttpServletRequest.class,Resource.class}, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL, resourceType="myproject/components/content/image") @Exporter(name="jackson", extensions="json", options= {                         @ExporterOption(name = "MapperFeature.SORT_PROPERTIES_ALPHABETICALLY", value = "true") }) public class ImageModel{ private static Logger LOG = LoggerFactory.getLogger(ImageModel.class); @SlingObject private SlingHttpServletRequest request; @Inject @Via("resource") private String image; } @Inject @Via("resource") private String imageMetaData; /** * @return the imageMetaData */ public String getImageMetaData() { String url = request.getRequestURI(); Resource resource = request.getResourceResolver().getResource("/content/dam/my-project/image/image.png"); Asse...

2 Minute OM Chanting | OM Chanting for busy people | Morning Om chant Mo...

Image

2 Minute OM Chanting | OM Chanting for busy people | Morning Om chant Mo...

Image

2 Minute Breathing Exercise English | Breathing Exercise for the Busy Pe...

Image

1 Minute OM Chanting for Busy People | 1 Minute OM Chanting | OM | Morni...

Image

Curl Command to set property on the Page

Image
  Set the property  from the  curl command  in  AEM . You can set the property at a  Single page  or  Multiple pages  in less time.Basically curl command is used to update property on multiple pages, publish/unpublished the multiple pages in one go on Dev, UAT, Production and other environment. I am trying to set the  navRoot  property as  false  for single and multiple pages. 1. Set navRoot property for the single page. You can just run below command in command prompt and can check the  jcr:content  of the below page path , Property will be updated as  navRoot=false    curl -u admin:admin -FnavRoot="false"  http://localhost:4502/content/we-retail/us/en/jcr:content 2. Set navRoot property for the multiple pages/More than one page. You can use the  &&  separator for the multiple pages. curl -u admin:admin -FnavRoot="true"  http://localhost:4502/content/we-retail/us/en/jcr...

Global Implementation Of Header and Footer In AEM

Image
  Global Implementation Of Header and Footer Approaches in AEM Please follow the links below to see the design approaches. Global Implementation of header and footer

Curl Command to Publish the AEM Page

Image
  Publish the single and multiple pages from author to publisher environment using the curl command.   Command for Publish a single page. curl -u admin:admin -X POST -F path="/content/we-retail/us/en/jcr:content" -F cmd="activate"  http://localhost:4502/bin/replicate.json Command for Publish multiple pages. curl -u admin:admin -X POST -F path="/content/we-retail/us/en/jcr:content" -F cmd="activate"  http://localhost:4502/bin/replicate.json  && curl -u admin:admin -X POST -F path="/content/we-retail/us/en/experience/jcr:content" -F cmd="activate"  http://localhost:4502/bin/replicate.json   To run the command  Open the Command Prompt  and  paste the curl command  and enter .  Please see the snapshot below for the reference. See the success output. If you want to double check whether your page is published or not just navigate the  page path  and see the u pdated date and time  in the  cq:lastReplicated...

1 मिनट श्वास ध्यान हिंदी | 1 Minute Breathing Meditation | Breathing Med...

Image

1 Minute Breathing Meditation | Breathing Meditation for the Busy People...

Image

Remove the default colors from Colorfield dialog in AEM

Image
Add the property showDefaultColors="{Boolean}false"   Once you will add this property. All the default colors will be disappear from the colorfield dialog. You can show your custom colors as per the requirement. Please see the below for the reference.  <backgroundColor jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/colorfield"     showDefaultColors="{Boolean}false"     text="Background Color"     fieldLabel="Background Color"     name="./backgroundColor"     showProperties="{Boolean}false">   <items jcr:primaryType="nt:unstructured"> <red jcr:primaryType="nt:unstructured" value="#FF0000"/>     <white jcr:primaryType="nt:unstructured" value="#FFFFFF"/>     <black jcr:primaryType="nt:unstructured" value="#000000"/>   </items> </backgroundColor> Yo...