Posts

Useful tips...Part1

Image
How to save credentials in Git? When we pull or push in repository using git bash or command line it asks us for user name & password every time.This seems very irritating to input it every time. To avoid this we can save our credentials in Git using below steps. 1: Give  below command $ git config credential.helper store 2: Now use command git pull 3: You will see that Git will ask you for entering user name & password. Provide username & password. Same user name & password will be saved inside git. 4: Again try git pull & you will notice that it will not prompt you for user name & password. It will use the credentials which we have saved in step 3. 5: Git stores credentials in text file named  .git-credentials  inside C:\Users\your-window-user How to rebuild client Libraries in AEM? In some scenarios when we have problem while building the client libraries,we may need to rebuild our client libraries manually. One such scenario is th

AEM Run Modes

Image
Run modes play an important role in aem. Run modes maps to an AEM instance. They are useful in case we want to provide diff configurations & logic based on the environments. Refer below link to learn about run modes in details. https://helpx.adobe.com/in/experience-manager/6-4/sites/deploying/using/configure-runmodes.html How to check the run mode of an AEM Server. Go to Felix Console . Go to Status tab in Navigation and click on sling settings option . Here you can see the Run Modes Direct link for accessing the same is http://localhost:4502/system/console/status-slingsettings To access AEM run modes in Sightly(HTL):- There is a way to read run modes in sightly which can be further used to write your logic based on  environments. Suppose there is a use-case where you want to display some warnings/messages based on the environment then you can easily do it in sightly without writing any logic in sling models or wcmusepojo. Here we are using

Diff between jcr:primaryType and jcr:mixinTypes

Image
There are two categories of node types, primary and mixin. Every node has a primary node type assigned to it upon creation. In addition, a mixin node type may be added to a node later in its lifecycle. The primary node type of a node usually defines node structure (i.e., allowed and required child nodes and properties) & Mixin node types usually specify additional properties or child nodes related to a capability being added to the node. These capabilities may include generic repository-level functions as in the case of the built-in mixins mix:versionable and mix:lockable, for example, or domain-level capabilities such as a (hypothetical) myapp:Emailable mixin type that adds the property myapp:emailAddress to a node. Below are some noticeable differences in both. 1:- Mixin Types are similar to interfaces, one node could have multiple mixin types.You can think of it as interfaces in Object Oriented world since a node can have multiple ones and they aim to add aditionnal pro

Sling Models

Image
Introduction: Sling models are released as part of aem 6.0. Sling Models are simple POJO classes which are mapped automatically with Sling Objects (resource, request objects.) and allow us to access jcr node property values directly into java classes. Features of Sling Models: - Pure POJO classes.   Entirely annotation driven (Need to write less code).   Can adapt multiple objects –  – minimal required Resource and SlingHttpServletRequest   OOTB, support resource properties (via ValueMap), SlingBindings, OSGi services, request attributes Support both classes and interfaces. Work with existing Sling infrastructure (i.e. not require changes to other bundles). Using Sling Models, you can do more with less code so you can reduce your coding efforts. Your code is more maintainable using Sling Modes. There are lot of ways to accomplish the component backend logic like JSP,Server Side Javascript,WCMuse,WCMUsePOJO. However, with the release of AEM 6.3 and AEM Core WCM Co

Customizing Cloud Service configuration in AEM

Image
There are many cloud services provided out of the box to connect aem with the adobe marketing cloud & third party services. You can access cloud services by  Cloud Services Some of the mostly used cloud service configurations are:- DTM Adobe Target Adobe Analytics Adobe Campaign Livefyre Facebook Connect Twitter Connect Youtube  reCaptcha Most useful and strong feature of C loud Service is that it allows inheritance from parent pages to child pages with the ability to break the inheritance at any level.So You can provide configuration at site top level/root page and all the child pages can use the same configuration by default. If you want to change the configuration at any level you can create a separate configuration for that page or simple uncheck the inheritance at child lev You can configure cloud service like this and can use at page level. 1:-Click on Configure now to create a new configuration.Give Name and title and click on creat