maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DOXIASITETOOLS-185) add helpers to traverse custom skin parameters
Date Thu, 21 Dec 2017 12:54:00 GMT

    [ https://issues.apache.org/jira/browse/DOXIASITETOOLS-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16299977#comment-16299977
] 

Hudson commented on DOXIASITETOOLS-185:
---------------------------------------

Build failed in Jenkins: Maven TLP » maven-doxia-sitetools » master #16

See https://builds.apache.org/job/maven-box/job/maven-doxia-sitetools/job/master/16/

> add helpers to traverse custom skin parameters
> ----------------------------------------------
>
>                 Key: DOXIASITETOOLS-185
>                 URL: https://issues.apache.org/jira/browse/DOXIASITETOOLS-185
>             Project: Maven Doxia Sitetools
>          Issue Type: Improvement
>          Components: Decoration model
>    Affects Versions: 1.7.5
>            Reporter: Hervé Boutemy
>            Assignee: Hervé Boutemy
>             Fix For: 1.8
>
>
> custom field is an open XML element, that Velocity has to traverse to find expected data:
on each traversal, a test has to be added.
> That leads to code like in Fluido skin:
> {code}#if ( $decoration.custom.getChild( 'fluidoSkin' ) && $decoration.custom.getChild(
'fluidoSkin' ).getChild( 'skipGenerationDate' )
>            && $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'skipGenerationDate'
).getValue() == 'true' ){code}
> or
> {code}#if ( $decoration.custom.getChild('fluidoSkin')
>            && $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'navBarStyle'
) )
>   #set ( $navBarStyle = $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'navBarStyle'
).getValue() ){code}
> or
> {code}#if ( $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'breadcrumbDivider'
) )
>   #set ( $breadcrumbDivider = $decoration.custom.getChild( 'fluidoSkin' ).getChild( 'breadcrumbDivider'
).getValue() )
> #else
>   #set ( $breadcrumbDivider = '/' )
> #end{code}
> Adding 3 methods to decoration:
> - {{getCustomChild( "fluidoSkin.navBarStyle" )}}
> - {{getCustomChildValue( "fluidoSkin.navBarStyle" )}}
> - {{getCustomChildValue( "fluidoSkin.breadcrumbDivider", "/" )}}
> would permit to simplify:
> {code}#if ( $decoration.getCustomChildValue( 'fluidoSkin.skipGenerationDate' ) == 'true'
){code}
> and
> {code}#if ( $decoration.getCustomChild('fluidoSkin.navBarStyle' ) )
>   #set ( $navBarStyle = $decoration.getCustomChild('fluidoSkin.navBarStyle' ).getValue()
){code}
> and
> {code}#set ( $breadcrumbDivider = $decoration.getCustomValue( 'fluidoSkin.breadcrumbDivider',
'/' ) ){code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message