Search in sources :

Example 1 with StaticHtml

use of com.enonic.xp.portal.impl.parser.StaticHtml in project xp by enonic.

the class PostProcessEvaluator method processContributions.

private HtmlBlocks processContributions(final HtmlBlocks htmlBlocks) {
    final HtmlBlocks.Builder processedHtmlBlocks = HtmlBlocks.builder();
    for (HtmlBlock htmlBlock : htmlBlocks) {
        if (isTagMarker(htmlBlock)) {
            final HtmlTag htmlTag = ((TagMarker) htmlBlock).getTag();
            final StaticHtml injectionHtml = evalPostProcessInjection(htmlTag);
            if (injectionHtml != null) {
                processedHtmlBlocks.add(injectionHtml);
            }
        } else {
            processedHtmlBlocks.add(htmlBlock);
        }
    }
    return processedHtmlBlocks.build();
}
Also used : StaticHtml(com.enonic.xp.portal.impl.parser.StaticHtml) HtmlBlocks(com.enonic.xp.portal.impl.parser.HtmlBlocks) HtmlTag(com.enonic.xp.portal.postprocess.HtmlTag) HtmlBlock(com.enonic.xp.portal.impl.parser.HtmlBlock) TagMarker(com.enonic.xp.portal.impl.parser.TagMarker)

Aggregations

HtmlBlock (com.enonic.xp.portal.impl.parser.HtmlBlock)1 HtmlBlocks (com.enonic.xp.portal.impl.parser.HtmlBlocks)1 StaticHtml (com.enonic.xp.portal.impl.parser.StaticHtml)1 TagMarker (com.enonic.xp.portal.impl.parser.TagMarker)1 HtmlTag (com.enonic.xp.portal.postprocess.HtmlTag)1