[SMSNIPPETS-1] How to process content in Java Created: 01/Aug/19 Updated: 23/Aug/19 |
|
| Status: | In Progress |
| Project: | Smart Snippets |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Alex Day | Assignee: | Mariusz Chruscielewski |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoR: |
Empty
|
| Date of First Response: |
| Description |
|
Howdy! I'm wondering if there is any documentation available on the Java APIs made available though the smart snippets module? Specifically my current question is: Thanks |
| Comments |
| Comment by Mariusz Chruscielewski [ 23/Aug/19 ] |
|
Hi Ben, I'm affrraid I need some example of what are you trying to achieve, but basically smart snippets placeholders are replaced in ContentMap class, just like standard Magnolia links:
@Override
public Object get(Object key) {
Object property = super.get(key);
if (property instanceof String && SmartSnippetsUtil.SNIPPET_PATTERN.matcher((String) property).find()) {
return SmartSnippetsUtil.convertSnippetsFromUUIDPattern((String) property);
}
return property; }
Maybe you can try to use SmartSnippetsUtil.convertSnippetsFromUUIDPattern ? |