You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Cyriaque Dupoirieux <Cy...@pcotech.fr> on 2005/10/24 11:49:29 UTC

[Structurer] custom templates are not found any more...

Hi,

    I had a problem since last week, I have found what it was :
    The structurer - or the themer ? - does not find custom templates 
(under project/src/documentation/resources/templates) anymore.
    Thorsten, do you now where it comes from ?

-- 

Salutations,
Cyriaque,


Re: Not adding new properties (Re: [Structurer] custom templates are not found any more...)

Posted by Thorsten Scherler <th...@apache.org>.
Agree, I will change that.

El lun, 24-10-2005 a las 11:41 +0100, Ross Gardler escribió:
> Thorsten Scherler wrote:
> > As well we have a new property:
> > project.theme-dir=${project.resources-dir}/themes
> 
> This is not a comment directly about this new property, but it is this 
> new one (and the many others introduced recently) that prompts this mail.
> 
> Issue for-588 [1] is about creating a new config system. It has been 
> proposed (although not agreed - nor objected to) that we use the 
> locationmap.xml for configuration [2]. Adding more configuration options 
> now only makes this move more difficult in the long term.
> 
> Furthermore, since these particular properties are nothing to do with 
> core, but are for plugins they shouldn't really be in 
> forrest.properties. Now that Tim has enabled plugin provided 
> locationmaps we can use the locationmap for plugin configuration. So the 
> above property would become:
> 
> <match pattern="project.theme-dir">
>    <location src="${project.resources-dir}/themes">
> </match>
> 
> (of course we could have a list of potential values too if we use the 
> select element)
> 
> Its use would become:
> 
> lm:project.themes-dir
> 
> I have been using this approach in the projectInfo plugin and it works 
> well. But we need wider use cases to fully test this out.
> 
> Perhaps the structurer plugin is one place we can do more such 
> experiments to try and spot the potential issues.
> 
> Ross
> 
> [1] http://issues.apache.org/jira/browse/FOR-588
> [2] http://marc.theaimsgroup.com/?l=forrest-dev&m=112827771411900&w=2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Not adding new properties (Re: [Structurer] custom templates are not found any more...)

Posted by Ross Gardler <rg...@apache.org>.
Thorsten Scherler wrote:
> As well we have a new property:
> project.theme-dir=${project.resources-dir}/themes

This is not a comment directly about this new property, but it is this 
new one (and the many others introduced recently) that prompts this mail.

Issue for-588 [1] is about creating a new config system. It has been 
proposed (although not agreed - nor objected to) that we use the 
locationmap.xml for configuration [2]. Adding more configuration options 
now only makes this move more difficult in the long term.

Furthermore, since these particular properties are nothing to do with 
core, but are for plugins they shouldn't really be in 
forrest.properties. Now that Tim has enabled plugin provided 
locationmaps we can use the locationmap for plugin configuration. So the 
above property would become:

<match pattern="project.theme-dir">
   <location src="${project.resources-dir}/themes">
</match>

(of course we could have a list of potential values too if we use the 
select element)

Its use would become:

lm:project.themes-dir

I have been using this approach in the projectInfo plugin and it works 
well. But we need wider use cases to fully test this out.

Perhaps the structurer plugin is one place we can do more such 
experiments to try and spot the potential issues.

Ross

[1] http://issues.apache.org/jira/browse/FOR-588
[2] http://marc.theaimsgroup.com/?l=forrest-dev&m=112827771411900&w=2

Re: [Structurer] custom templates are not found any more...

Posted by Thorsten Scherler <th...@apache.org>.
El lun, 24-10-2005 a las 11:49 +0200, Cyriaque Dupoirieux escribió:
> Hi,
> 
>     I had a problem since last week, I have found what it was :
>     The structurer - or the themer ? - does not find custom templates 
> (under project/src/documentation/resources/templates) anymore.
>     Thorsten, do you now where it comes from ?
> 

Hmm, since *this morning* there is a new file structure in place.
forrest-trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes
...
|-- pelt
|   |-- css
|   |   |-- leather-dev.css
|   |   |-- pelt.basic.css
|   |   |-- pelt.print.css
|   |   `-- pelt.screen.css
|   `-- html
|       |-- branding-theme-profiler.ft
|       |-- content-abstract.ft
|       |-- content-main.ft
|       |-- content-xml-link.ft
|       |-- nav-main-sub.ft
|       |-- nav-section-round-bottom.ft
|       |-- nav-section.ft
|       |-- search-input.ft
|       `-- siteinfo-credits.ft
`-- pelt.fv

As well we have a new property:
project.theme-dir=${project.resources-dir}/themes

The whole matching route can be seen in locationmap-themer.xml and
locationmap-structurer.xml.

For contracts the locationmap-themer.xml gives:
<!-- Project implementation of templates have priority before default
ones.
        If no implementation can be found we use the noFt (~ - no
forrest:template) implementation.  
       {1} name of the contract -->
    <match pattern="resolve.contract.html.**">
      <select type="exists">
        <!-- project-based theme -->
        <location
src="{project:theme-dir}/{project:theme}/html/{1}.ft" />
        <!-- project-based default fallback -->
        <location
src="{project:theme-dir}/{defaults:theme}/html/{1}.ft" />
        <!-- project-application-based theme -->
        <location
src="{project:themer}/resources/themes/{project:theme}/html/{1}.ft" />
        <!--  project-application-based default fallback -->
        <location
src="{project:themer}/resources/themes/{defaults:theme}/html/{1}.ft" />
        <!-- forrest-application-based theme -->
        <location
src="{defaults:themer}/resources/themes/{project:theme}/html/{1}.ft" />
        <!--  forrest-application-based default fallback -->
        <location
src="{defaults:themer}/resources/themes/{defaults:theme}/html/{1}.ft" />
        <!--  forrest-application-based no found -->
        <location
src="{defaults:themer}/resources/themes/{defaults:theme}/html/noFt.ft" />
      </select>
    </match>

HTH

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)