You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Ross Gardler <ro...@saafe.org> on 2003/10/23 19:47:37 UTC

in place editing of skins and sitemaps

Now that we have inplace editing of content in the src directory the 
backcopy target has gone from forrest.build.xml, I like this removal of 
an extra stage in my editing/publishing cycle.

However, it has introduced a problem. If I make changes to my skin I 
still need to do it in the build/webapp directory (at least I assume I 
do since they are stll there). I imagine the same approach can be used 
in the xmaps to make the skins editable in src (and if so I'll tackle it 
tomorrow unless someone beats me to it).

However, changes to xmaps need to be done in the build/webapp directory 
and I suspect that this will have to be the case. Anyone know otherwise?
If this is the case should we resurect backcopy for copying xmap 
alterations back into the src tree?

Ross


Re: in place editing of skins and sitemaps

Posted by Ross Gardler <rg...@wkwyw.net>.
Nicola Ken Barozzi wrote:
> Ross Gardler wrote:
>> If I make changes to my skin I 
>> still need to do it in the build/webapp directory (at least I assume I 
>> do since they are stll there).

<snip/>

> It should be easy to do. If you want to tackle it now (I was planning to 
> do it in the following days anyhow), look in resources.xmap. That's 
> where the skins are resolved.
> 

Attached patch allows skins to be editied in the src directory. It also 
prevents skins being copied into the build directory. There is a problem 
with the breadcrumbs though. Since the JS file use info from 
skinconf.xml (which I assume was copied into the JS when ANT copied 
across) we no longer get the breadcrumb info from skinconf.xml.

As a temporary measure I have commented out that section. This means 
that breadcrumbs work for directories but not for values in 
skinconf.xml. I'm not sure of the best way of fixing this, perhaps 
meta-tags or hidden form fields in HTML?

Ross

Re: in place editing of skins and sitemaps

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Ross Gardler wrote:
> Now that we have inplace editing of content in the src directory the 
> backcopy target has gone from forrest.build.xml, I like this removal of 
> an extra stage in my editing/publishing cycle.
> 
> However, it has introduced a problem. If I make changes to my skin I 
> still need to do it in the build/webapp directory (at least I assume I 
> do since they are stll there). I imagine the same approach can be used 
> in the xmaps to make the skins editable in src (and if so I'll tackle it 
> tomorrow unless someone beats me to it).

It should be easy to do. If you want to tackle it now (I was planning to 
do it in the following days anyhow), look in resources.xmap. That's 
where the skins are resolved.

All the skin info has to be resolved relative to the directory set in 
cocoon.xconf. Look in cocoon.xcong and search for the skin dir property. 
That is what you will have to use.

For an example of something already done, look in teh same file but in 
the last section, where the project resources are resolved.

It's easier to do than to explain ;-)

> However, changes to xmaps need to be done in the build/webapp directory 
> and I suspect that this will have to be the case. Anyone know otherwise?

Not necessarily. The only file that needs filtering is cocoon.xconf, and 
that can be referenced outside. But then we have the libs, and those 
should be callable from the classpath even for Jetty. Finally there is 
the LocationMap that should solve the cocoon.xconf filtering.

Now you know my plans ;-)

All of the changes done till now were partial refactorings to get to 
this point. If you can get the skin resolving in place, I'll try to take 
care of the rest.

Ciao :-)

> If this is the case should we resurect backcopy for copying xmap 
> alterations back into the src tree?

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------