Hi Guys , I jsut have two questions regarding sling dynamic include
I will provide the steps i followed ,
please correct if anything is
1. Include the SDI as a dependency in the ui.apps pom.xml
<!-- Sling dynamic include -->
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.dynamic-include</artifactId>
</dependency>
2. Embed the SDI as a package for deployment in ui.apps pom.xml
<embedded>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.dynamic-include</artifactId>
<target>/apps/my-site/install</target>
</embedded>
3. Include the SDI as a dependency in the parent pom.xml
<!-- Sling dynamic include --> <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.dynamic-include</artifactId> <version>3.1.2</version> </dependency>
4. create o OSGI config ;
ui.config/src/main/content/jcr_root/apps/mysite/osgiconfig/config.publish.dev
// Configuration created by Apache Sling JCR Installer
{
"include-filter.config.enabled":true,
"include-filter.config.selector":"nocache",
"include-filter.config.include-type":"SSI",
"include-filter.config.resource-types":[
"mysite/components/content/form/container"
],
"include-filter.config.path":"/content/mysite"
}
5. I rolled out the required dispacther changes and apachae configurations
1) Allow dispatcher module
LoadModule include_module modules/mod_include.so
2) Modify the <Directory> Block
configure the directory to enable SSI processing
<Directory "${DOCROOT}">
RequestHeader unset Authorization
Options Indexes FollowSymLinks Includes
AllowOverride None
Require all granted
AddOutputFilter INCLUDES .html
</Directory>
3)Define a cache rule in dispatcher for not to cache content URL’s ending with .nocache.html
/0001 { /glob “.nocache.html” /type “deny” }{}{*}
My questions
1) Is the configuration name correct? Should it be "org.apache.sling.dynamicinclude.impl.DynamicIncludeFilter" or "org.apache.sling.dynamicinclude.Configuration.cfg.json"?
2)Is it neccesary to embed the sling dynaminc include bundle or depency is enough ?
<embedded>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.dynamic-include</artifactId>
<target>/apps/my-site/install</target>
</embedded>
Solved! Go to Solution.
Views
Replies
Total Likes
You need to change the config, its a factory config
e.g. org.apache.sling.dynamicinclude.Configuration-demo.cfg.json
Yes, you need to embed sdi in order to deploy on AEM
Example -
https://github.com/arunpatidar02/aemaacs-aemlab/pull/21/files
You need to change the config, its a factory config
e.g. org.apache.sling.dynamicinclude.Configuration-demo.cfg.json
Yes, you need to embed sdi in order to deploy on AEM
Example -
https://github.com/arunpatidar02/aemaacs-aemlab/pull/21/files
Views
Likes
Replies
Views
Likes
Replies