Quantcast
Channel: Adobe CQ5/AEM (Adobe Experience Manager )
Viewing all 48 articles
Browse latest View live

How to Exclude Child Pages Of A Page When Creating A Package in AEM/CQ5 Package

$
0
0
Open package manager

        http://localhost:5632/crx/packmgr/index.jsp

Click on the crate packge




Enter package name ,version and Group. Click on OK.

Click on the respective package icon then click on EDIT button.

After Edit navigate to filters tab. Click on the "add filter" button.



      Add the root path :    /content/geometrixx/en/toolbar

Then click on the Add rule button. 

   exclude  : /content/geometrixx/en/toolbar/*.*
   include   : /content/geometrixx/en/toolbar/jcr:content

Click on the done button. Then save.

To build the package click on the build button. 



By Using Regular Expresion


Exclude  : /content/geometrixx/en/toolbar/[a-z].*

        A  filter to create a package for root /content/geometrixx/en and exclude all the page
                below /content/geometrixx/en that starts with range a to z.

Exclude : /content/geometrixx/en/toolbar/s.*

        A  filter to create a package for root /content/geometrixx/en and exclude all the page below 
                 /content/geometrixx/en that starts with s.





How to Disbale Target Option on Component Edit

$
0
0
        To disable "target" option when edit the component you need to add   property 
                 cq:disableTargeting="true" to cq:editConfig Node


               cq:actions="[text:Button,-,edit,delete]"
               cq:dialogMode="floating"
               cq:disableTargeting="true"
               jcr:primaryType="cq:EditConfig"

Performance Issue In CRXDE IDE Of AEM/Adobe CQ5

$
0
0
After open the CRXDE.

Navigate to Window > General > Workspace > 

Uncheck Build automatically option.

Restart the CRXDE.




How To Set Dynamic Value For Component Edit Bar Label

$
0
0

Sample code in JSP

   
you can set the label value of the component edit bar dynamically.



    editContext is implicit object of com.day.cq.wcm.api.components.EditContext interface

   editContext.getEditConfig().getToolbar().add(0, new Toolbar.Label("sample"));


By Using cq:EditConfig

Add the below configurations under your component's "cq:EditConfig" node

<cq:actionConfigs jcr:primaryType="nt:unstructured">
        <separator
            jcr:primaryType="nt:unstructured"
            xtype="tbseparator"/>
        <manage
            jcr:primaryType="nt:unstructured"
            handler="function(){&#xa;&#x9;window.open(CQ.WCM.getPagePath()+&quot;.openNewPage.html&quot;, '_blank');&#xa;}"
            text="Edit on Other Page"/>
    </cq:actionConfigs>








Handy Urls in AEM/CQ 5.6.1

$
0
0
AEM 5.6 - Quick Reference :  http://www.aemcasts.com/qr.html 

CRX explorer  :  http://localhost:8080/crx/explorer/index.jsp

CRXDE Lite     :   http://localhost:8080/crx/de/index.jsp

Query debug tool : http://localhost:8080/libs/cq/search/content/querydebug.html

Content sync console :  http://localhost:8080/libs/cq/contentsync/content/console.html

User manager standalone ui : http://localhost:8080/libs/granite/security/content/useradmin.html

Upgrade nodetypes : http://localhost:8080/libs/cq/compat/components/ntupgrade.html

 Built in profiler  : http://localhost:8080/crx/explorer/diagnostic/prof.jsp

Tag window :  http://localhost:8080/tagging


OSGI Console

Felix  console  :  http://localhost:8080/system/console/bundles

Workflow maintenance :
                   http://localhost:8080/system/console/jmx/com.adobe.granite.workflow:type=Maintenance

Repository maintenance :  http://localhost:8080/system/console/jmx/com.adobe.granite:type=Repository

Maven Dependency for the packages/classes : http://localhost:8080/system/console/depfinder

List of adaptable  classes using the adaptTo() : http://localhost:8080/system/console/adapters

Built in profiler  :  http://localhost:8080/system/console/profiler

Sling properties : http://localhost:8080/system/console/status-slingsettings


Client Libs

Compile client libs : http://localhost:8080/libs/granite/ui/content/dumplibs.rebuild.html?rebuild=true

To know dependencies : http://localhost:8080/libs/granite/ui/content/dumplibs.html

How to debug single file Clientlibs in single file   :   ?debugClinetLibs=true

Bookmarks









        

Disabling the XML and JSON render in Adobe CQ5/AEM

$
0
0
To disable the XML or JSON renderer, navigate to the OSGI configuration manager at the following URL:

http://localhost:8080/system/console/configMgr


Click on Apache Sling GET Servlet, uncheck “Enable XML” and Enable JSON , then click save.



AEM /Adobe CQ 5.6.1 Supported Browsers and Java Content Repositories

$
0
0
AEM 5.6.1 supports the following browsers


Browser
Support for Classic UI
Support for Touch UI
Microsoft Internet Explorer 11
Z: Not supported
Z: Not supported
Microsoft Internet Explorer 10
A: Supported
A: Supported (1)
Microsoft Internet Explorer 9
A: Supported
A: Supported
Microsoft Internet Explorer 8
A: Supported (6)
Z: Not supported
Microsoft Internet Explorer 7
Z: Not supported
Z: Not supported
Microsoft Internet Explorer 6
Z: Not supported
Z: Not supported
Mozilla Firefox 25
A: Supported
A: Supported
Mozilla Firefox 24 (ESR) (3)
A: Supported
A: Supported
Mozilla Firefox 17 (ESR) (3)
Z: Not supported
Z: Not supported
Mozilla Firefox 10 (ESR) (3)
Z: Not supported
Z: Not supported
Google Chrome 31+
A: Supported
A: Supported
Apple Safari 7.0 (OS X)
A: Supported
A: Supported
Apple Safari 6.0 (OS X)
A: Supported
A: Supported
Apple Safari 6.0 (iOS) (4)(5)
Z: Not supported
A: Supported



AEM 5.6.1 supported java Content Repositories


latform
Support Level
Adobe CRX 2.4
A: Supported
Apache Jackrabbit 2.5.3
D: Validated, optional support available



For more information click here


AEM/Adobe CQ5 Training Videos


Best way to use suffix in AEM/Adobe CQ5 URLs

$
0
0
It is better to use the suffix with selectors only that will help the dispatcher when flush cache.

Ex:-
<resource path>/results.html

<resource path>/results.html/suffix(Not recommended )

<resource path>/results.html/suffix.suffix1  (Not recommended )

<resource path>/results.slelector.html/suffix(Recommended)

<resource path>/results.slelector.html/suffix.suffix1(Recommended)



Maven Plugin to Install Bundle Directly Into OSGI in AEM/Adobe CQ5

$
0
0

Use the following plugin in your POM to install bundle directly into OSGI console.


<plugin>
    <groupId>org.apache.sling</groupId>
    <artifactId>maven-sling-plugin</artifactId>
     <version>2.1.0</version>
    <executions>
       <execution>
           <id>install-bundle</id>
          <goals>
                 <goal>install</goal>
         </goals>
       </execution>
    </executions>
    <configuration>
             <slingUrl>http://localhost:8080/system/console/install</slingUrl>
     <user>admin</user>
     <password>admin</password>
    </configuration>
</plugin>

Create an Adobe CQ Maven archetype project

$
0
0
To create an Adobe CQ archetype project, perform these steps:

1. Open the command prompt and go to your working directory (D:\smaple-cq-project).
2. Run the following Maven command:
mvn archetype:generate -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DarchetypeVersion=1.0.0 -DarchetypeRepository=adobe-public-releases
3. When prompted for additional information, specify these values:
groupId: com.test
artifactId: cq-test-project
version: 1.0-SNAPSHOT : 1.0.0
package: com.aem.coe
appsFolderName: AEM-Training
artifactName: AEM Training
packageGroup: AEM
confirm: Y
4. Once done, you will see a message like:

How to setup Maven in your development environment

$
0
0
You can use Maven to build an OSGi bundle. Maven manages required JAR files that a Java project needs in its class path. Instead of searching the Internet trying to find and download third-party JAR files to include in your project’s class path, Maven manages these dependencies for you.

You can download Maven 3 from the following URL:

  1. Unzip the distribution archive, i.e. apache-maven-3.1.1-bin.zip to the directory you wish to install Maven 3.1.1. These instructions assume you chose C:\Program Files\Apache Software Foundation. The subdirectory apache-maven-3.1.1 will be created from the archive
  2. Add the M2_HOME environment variable by opening up the system properties (WinKey + Pause), selecting the "Advanced" tab, and the "Environment Variables" button, then adding the M2_HOME variable in the user variables with the value C:\Program Files\Apache Software Foundation\apache-maven-3.1.1. Be sure to omit any quotation marks around the path even if it contains spaces. Note: For Maven   2.0.9, also be sure that the M2_HOME doesn't have a '\' as last character.
  3. In the same dialog, add the M2 environment variable in the user variables with the value %M2_HOME%\bin.
  4. Optional: In the same dialog, add the MAVEN_OPTS environment variable in the user variables to specify JVM properties, e.g. the value -Xms256m -Xmx512m. This environment variable can be used to supply extra options to Maven.
  5. In the same dialog, update/create the Path environment variable in the user variables and prepend the value %M2% to add Maven available in the command line.
  6. In the same dialog, make sure that JAVA_HOME exists in your user variables or in the system variables and it is set to the location of your JDK, e.g. C:\Program Files\Java\jdk1.5.0_02 and that %JAVA_HOME%\bin is in your Path environment variable.
  7. Open a new command prompt (Winkey + R then type cmd) and run mvn --version to verify that it is correctly installed.






                Sitemaps for the Adobe CQ Site

                $
                0
                0

                Sitemaps for the Adobe CQ Site

                Sitemaps are an easy way for webmasters to inform search engines about pages on their sites that are available for crawling. In its simplest form, a Sitemap is an XML file that lists URLs for a site along with additional metadata about each URL. We don’t need to submit each Sitemap individually. Just submit the Sitemap index file and you're good to go.
                Creating and submitting a Sitemap helps make sure that search engine knows about all the pages on your site, including URLs that may not be discoverable by search engine normal crawling process.
                The Sitemaps protocol enables you to let search engines know what content you would like indexed. To tell search engines the content you don't want indexed.


                Create sitemap index category page:


                Create a page “sitemap-index-categories” in CQ. Under this page create category node with urls property. The category node name should be the page name that is under the root of your site.




                Note: “/…” mean that all pages and subdirectories in that directory should be included in the referenced sitemap.


                Sitemap index file generation:


                Create a sitemap-index template and page component. Create xml.jsp under the sitemap index page component. Write the logic in the xml.jsp that will iterate over the category nodes which are created under the page “sitemap-index-categories” and generated the xml file in the below structure .

                Sample sitemap index file

                <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
                <sitemap> <loc>http://<host>/<category-node-name>.xml</loc></sitemap>
                <sitemap><loc>http://<host>/<category-node-name>..xml</loc></sitemap>

                </sitemapindex>



                Sitemap Generation


                Create xml.jsp under the page component which would be the super type of all your templates, So that you can access in the every page in the site.
                In the xml.jsp write a logic that will read the URl to get the “category-node-name”. Read the urls property of “category-node” and then generate the below xml structure.  If the URL contains “/…” at the end you need to include all pages and subdirectories in that directory in the xml file.

                Sample sitemap file:

                <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
                <url> <loc>http://<host>/about_us.html</loc></url>
                <url> <loc http://<host>/about_us/<page-path>.html </loc> </url>

                </urlset >



                Note: Create sitemap_index page using sitemap-index template under the root of your site. Access sitemap_index.xml from browser url to generate the sitemap index.

                References:



                AEM6 /Adobe CQ5 How to Add and Read Bundle / Service Configurations(String, Dropdown, Array/Multifield )

                $
                0
                0

                Adding Properties to the Bundle/ OSGI CQ Service

                String / TextField

                @Property(value = "GET")
                static final String STRING_VAL = "string.textfield";

                String Array / Multifield 

                @Property ( unbounded=PropertyUnbounded.ARRAY, value={"*"},label="Template paths",description="eg: /apps/devtools/templates/page-home" )
                private static final String MUTIFIELD_EX = "multifield.test";

                Boolean Field

                @Property(boolValue={false}, label="Boolean values", description="Booealn test")
                private static final String BOOLEN_TEST = "boolean_test";

                 Dropdown

                @Property( options={
                @PropertyOption(name="blue", value="color-blue"),
                @PropertyOption(name="green", value="color-green"), 
                @PropertyOption(name="red", value="color-red"), 
                @PropertyOption(name="yellow", value="color-yellow"), 
                private static final String SELECTION_TEST = "dropdown.test";

                Reading Properties of Bundle/ OSGI CQ Service


                1) You to get the ConfigurationAdmin  reference

                @Reference
                    ConfigurationAdmin configAdmin;

                2) Get Bundle Configuratinn
                            Configuration config = configAdmin.getConfiguration(this.getClass().getCanonicalName());

                3) Get properties of conguration
                   Dictionary<?, ?> configProperties = config.getProperties();

                4) Red Properties
                           

                Reading String/TextField

                          String texfiledValue =  (String) configProperties.get( STRING_VAL );

                Reading the Dropdown 

                        String dropdownTest  =  (String) configProperties.get( SELECTION_TEST );

                Reading Boolean 

                          Boolean booealnTest = ( Boolean ) configProperties.get( BOOLEN_TEST );

                Reading  Array/Multifield   

                           String[] multifieldVlaues  =  (String[]) configProperties.get( MUTIFIELD_EX );

                    for( String value : multifieldVlaues ){
                out.println( value );
                }


                How to Install/Add Bundles, Content Packages or Configurations at Runtime CRX in AEM/Adobe CQ5

                $
                0
                0

                Install Bundles, Content Packages or Configurations at Runtime 

                If you want to install additional packages into the CRX , Create install folder under the crx-quickstart.
                Put your bundles, content packages or configurations in install folder. It will pick up while instance start and install into the CRX repository. Packages will install into CRX in the alphabetic order.

                References :
                AEM Documentation
                Adobe Community

                You can define additional bundles based on run modes

                for this you need to create install.<run mode> folder.

                for more information click here


                JCR-SQL2 Queries For AEM / Adobe CQ Developer

                Component not showing in Touch UI / SideKick of Classical UI in AEM / Adobe CQ5 / AEM6

                $
                0
                0

                To see component in the Touch UI

                If you want to see the component in touch UI components list. The component Should have cq:editConfig node

                To See Component in the SideKick in Classic UI

                • The component should have dailog.
                • if component have dialog and not showing in sidekick. Check title of Component it should starts with capital letter.






                How to include clientlibs in you component using Sightly AEM/Adobe CQ/AEM6

                $
                0
                0

                How to use client libs in Sightly

                First you should declare data-sly-use.clientlibInclude in your .html file

                <div data-sly-use.clientlibInclude="${'/libs/granite/sightly/templates/clientlib.html'}"></div>

                how to  include only CSS of clientlib 

                <output data-sly-call="${clientlibInclude.css @ categories='clientlib1,clientlib2'}" data-sly-unwrap/>

                how to  include only JS of clientlib 

                <output data-sly-call="${clientlibInclude.js @ categories='clientlib1,clientlib2'}" data-sly-unwrap />

                how to  include both CSS and JS of clientlib 

                <output data-sly-call="${clientlibInclude.all @ categories='clientlib1,clientlib2'}" data-sly-unwrap />


                Comparing Sightly , Handlebar and JSP

                Performance Tuning Tips For AEM 5.x / Adobe CQ 5.x and AEM 6.X

                Viewing all 48 articles
                Browse latest View live