org.homepage_widgets
Classes
Functions
|
Module Contents
- org.homepage_widgets.get_lead(text: str, max_chars: int = 180, consider_sentences: bool = True) str [source]
- class org.homepage_widgets.PanelWidget[source]
- template = Multiline-String[source]
Show Value
""" <xsl:template match="panel"> <div class="side-panel requires-children"> <xsl:attribute name="data-required-children"> <xsl:value-of select="'a:not(.more-link)'"/> </xsl:attribute> <xsl:attribute name="data-required-count"> <xsl:value-of select="'1'"/> </xsl:attribute> <xsl:attribute name="data-required-unless"> <xsl:value-of select="'.is-logged-in'"/> </xsl:attribute> <xsl:apply-templates select="node()"/> </div> </xsl:template> """
- class org.homepage_widgets.LinksWidget[source]
- template = Multiline-String[source]
Show Value
""" <xsl:template match="links"> <xsl:if test="@title"> <h2> <xsl:value-of select="@title" /> </h2> </xsl:if> <ul class="panel-links"> <xsl:for-each select="link"> <li> <a> <xsl:attribute name="href"> <xsl:value-of select="@url" /> </xsl:attribute> <xsl:value-of select="node()" /> </a> <xsl:if test="@description"> <small> <xsl:value-of select="@description" /> </small> </xsl:if> </li> </xsl:for-each> </ul> </xsl:template> """
- class org.homepage_widgets.DirectoriesWidget[source]
- class org.homepage_widgets.NewsWidget[source]
- class org.homepage_widgets.EventsWidget[source]
- class org.homepage_widgets.TilesWidget[source]
- template = Multiline-String[source]
Show Value
""" <xsl:template match="homepage-tiles"> <xsl:choose> <xsl:when test="@show-title"> <metal:block use-macro="layout.macros['homepage-tiles']" tal:define="show_title True" /> </xsl:when> <xsl:otherwise> <metal:block use-macro="layout.macros['homepage-tiles']" tal:define="show_title False" /> </xsl:otherwise> </xsl:choose> </xsl:template> """