http://localhost:4502/libs/cq/workflow/admin/console/content/models.html
Here is the official documentation from Adobe in case if you want more on this https://helpx.adobe.com/in/experience-manager/kb/hide-workflow-models-start-workflow-list.html
AEM4BEGINNER blog is for Beginners who are interested in learning Adobe Experience Manager (AEM) aka Adobe CQ5 from basics. The Information provided in this blog is for learning and testing purposes only. Here, I have posted the information which I know or gathered from different sources.
Content Fragment Models are built with elements from various out-of-the-box data types, including single-line text, multi-line text, number, boolean (only for checkboxes), date/time, enumeration (only for static dropdown values), tags, and content reference.
After investigating the structure of the Content Fragment Model form builder configuration inside CRXDE, I found that we can easily add most other data types (there are some restrictions for a few datatypes). To extend and customize this form builder configuration of Content Fragment Model Editor, we need to overlay the Content Fragment form builder resource.
In our client’s case, we needed to set the requirement to add the Color Picker field in the Content Fragment Model in AEM 6.5. In this post, I’m going to show you how extended the functionality of the Content Fragment Model to set the Color Picker data type.
Now you are successfully done with the node overlay and AEM customization process.
You can use these same steps to extend the functionality of the Content Fragment Model whenever you get such a requirement for other data types as well!
Download this package for reference, and don’t forget to drop a comment if you need more help on this.
<!-- within /project/dependencies -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.11.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-osgi</artifactId>
<version>0.34.22</version>
<scope>provided</scope>
</dependency>
<!-- within /project/build/plugins/plugin (content-package-maven-plugin) -->
<embedded>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<target>/apps/myapp/install</target>
</embedded>
<embedded>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-osgi</artifactId>
<target>/apps/myapp/install</target>
</embedded>
Once the bundle is installed you can then use the Flexmark API to retrieve and leverage the Markdown content from the AEM repository, for example using a Sling Model like this one which retrieves Markdown content from the property markdownfield and converts the Markdown content to HTML:package com.myorg.site.models;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.models.annotations.Model;
import org.apache.sling.models.annotations.injectorspecific.Self;
import com.vladsch.flexmark.ast.Node;
import com.vladsch.flexmark.html.HtmlRenderer;
import com.vladsch.flexmark.parser.Parser;
import com.vladsch.flexmark.util.options.MutableDataSet;
@Model(adaptables = Resource.class)
public class DiscussionMarkdownModel {
@Self
private Resource resource;
public String getHtml() {
MutableDataSet options = new MutableDataSet();
Parser parser = Parser.builder(options).build();
HtmlRenderer renderer = HtmlRenderer.builder(options).build();
Node node = parser.parse(resource.getValueMap().get("markdownfield", String.class));
return renderer.render(node);
}
}
With the new Flexmark OSGi bundle, integrating Markdown in AEM is painless, as we can see in this simple example./*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to
*/
package com.perficient.adobe.predicates;
import java.util.Locale;
import java.util.Optional;
import com.day.cq.search.Predicate;
import com.day.cq.search.eval.AbstractPredicateEvaluator;
import com.day.cq.search.eval.EvaluationContext;
import org.osgi.service.component.annotations.Component;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Component(factory = "com.day.cq.search.eval.PredicateEvaluator/equalsIgnoreCase")
public class CaseInsensitiveEquals extends AbstractPredicateEvaluator {
private static final Logger log = LoggerFactory.getLogger(CaseInsensitiveEquals.class);
static final String PREDICATE_PROPERTY = "property";
static final String PREDICATE_VALUE = "value";
static final String PREDICATE_LOCALE = "locale";
@Override
public String getXPathExpression(Predicate predicate, EvaluationContext context) {
log.debug("Evaluating predicate: {}", predicate);
String property = predicate.get(PREDICATE_PROPERTY);
Locale locale = Optional.ofNullable(predicate.get(PREDICATE_LOCALE)).map(lt -> Locale.forLanguageTag(lt))
.orElse(Locale.getDefault());
String value = predicate.get(PREDICATE_VALUE).toLowerCase(locale).replace("'", "''");
String query = String.format("fn:lower-case(@%s)='%s'", property, value);
log.debug("Generated query: {}", query);
return query;
}
}
Once the custom predicate is available in your application, it can be used in any Query Builder query as such:path=/content/test
equalsIgnoreCase.property=test
equalsIgnoreCase.value=test
equalsIgnoreCase.locale=en_US
The locale parameter is not required, but would generally be recommended unless the input will always be in the system default locale.