Arthur Bogaart pushed to branch bugfix/ESSENTIALS-1016 at cms-community / hippo-essentials
Commits: e569db08 by Arthur Bogaart at 2016-08-12T13:35:18+02:00 ESSENTIALS-1016 Use new componentId param - Scope CSS style with componentID - - - - - 1 changed file: - plugins/banner-and-carousel/src/main/resources/freemarker/essentials-carousel.ftl Changes: ===================================== plugins/banner-and-carousel/src/main/resources/freemarker/essentials-carousel.ftl ===================================== --- a/plugins/banner-and-carousel/src/main/resources/freemarker/essentials-carousel.ftl +++ b/plugins/banner-and-carousel/src/main/resources/freemarker/essentials-carousel.ftl @@ -1,5 +1,6 @@ <#include "../include/imports.ftl"> +<#-- @ftlvariable name="componentId" type="java.lang.String" --> <#-- @ftlvariable name="item" type="{{beansPackage}}.Banner" --> <#-- @ftlvariable name="pageable" type="org.onehippo.cms7.essentials.components.paging.Pageable" --> <#-- @ftlvariable name="cparam" type="org.onehippo.cms7.essentials.components.info.EssentialsCarouselComponentInfo" --> @@ -9,11 +10,6 @@ <#else> <#assign pauseCarousel = ''/> </#if> - <#if editMode> - <#assign componentId><@hst.namespace/>_${.now?long?c}</#assign> - <#else> - <#assign componentId><@hst.namespace/></#assign> - </#if> <div id="${componentId}" class="carousel slide" data-ride="carousel" data-interval="${cparam.interval?c}" data-pause="${pauseCarousel}" data-wrap="${cparam.cycle?string}"> <ol class="carousel-indicators"> @@ -54,7 +50,7 @@ <@hst.headContribution category="htmlHead"> <style type="text/css"> /* Carousel base class */ - .carousel { + #${componentId} { height: ${cparam.carouselHeight}px; /*width: ${cparam.carouselWidth}px;*/ margin-bottom: 60px; @@ -67,7 +63,7 @@ } /* Declare heights because of positioning of img element */ - .carousel .item { + #${componentId} .item { height: ${cparam.carouselHeight}px; background-color: ${cparam.carouselBackgroundColor}; } View it on GitLab: https://code.onehippo.org/cms-community/hippo-essentials/commit/e569db089aeb01eecc35b0cf7954fa4fac5c6d95
_______________________________________________ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn