You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (JIRA)" <ji...@codehaus.org> on 2013/03/02 23:55:52 UTC

[jira] (MSKINS-81) Decoration model body/footer not correctly implemented by site.vm

Michael Osipov created MSKINS-81:
------------------------------------

             Summary: Decoration model body/footer not correctly implemented by site.vm
                 Key: MSKINS-81
                 URL: https://jira.codehaus.org/browse/MSKINS-81
             Project: Maven Skins
          Issue Type: Bug
          Components: Fluido Skin
    Affects Versions: fluido-1.3.0, fluido-1.3.1
            Reporter: Michael Osipov


Documenation for /body/footer says:

bq. If present, the contained text will be used instead of the generated copyright text.

The [default skin|https://svn.apache.org/repos/asf/maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/resources/org/apache/maven/doxia/siterenderer/resources/default-site.vm] does this correctly with:

{code}
<div id="footer">
      <div class="xright">
      #if($decoration.body.footer)
        $decoration.body.footer
      #else
        Copyright &#169;#copyright()All Rights Reserved.#publishDate( "bottom" $decoration.publishDate $decoration.version )
      #end
      </div>
      <div class="clear">
        <hr/>
      </div>
{code}

Unfortunately, this skin does not observe that and simply appends the content:

{code}
<div class="row">
          #if ( $decoration.custom.getChild( 'fluidoSkin' ) && $decoration.custom.getChild( 'fluidoSkin' ).getChild('copyrightStyle') )
            <p class="$decoration.custom.getChild( 'fluidoSkin' ).getChild('copyrightStyle').getValue()">Copyright &copy;#copyright()All Rights Reserved.#publishDate( "bottom" $decoration.publishDate $decoration.version )</p>
          #else
            <p class="span12">Copyright &copy;#copyright()All Rights Reserved.#publishDate( "bottom" $decoration.publishDate $decoration.version )</p>
          #end

        </div>

        #if ( $decoration.body.footer )
          #foreach( $item in $decoration.body.footer.getChildren() )
            #set ( $foot = $item.toString().trim() )
            #set ( $documentHeader = '<?xml version="1.0" encoding="UTF-8"?>' )
            #set ( $foot = $StringUtils.replace( $foot.toString(), $documentHeader, "" ) )
            ## Workaround for http://jira.codehaus.org/browse/MSITE-135
            ## Use StringUtils untill http://jira.codehaus.org/browse/DOXIASITETOOLS-67 is fixed
            ## #eval macro not supported yet, that is a silly turnaround to allow ASF projects adopt fluido
            $StringUtils.replace( $foot, '@project.name@', ${project.name} )
          #end
        #end
{code}

So, footer cannot be exchanged.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira