cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Messing, Elad" <elad.mess...@eml-d.villa-bosch.de>
Subject AW: AW: AW: AW: AW: Design note - Building a template mechanism
Date Thu, 07 Apr 2005 10:09:11 GMT
Thanks for the clear example. I completely understand. 
It has not occurred to me that in development the web application might not be implemented
under the root context.

Elad 

-----Ursprüngliche Nachricht-----
Von: gounis@osmosis.gr [mailto:gounis@osmosis.gr] 
Gesendet: Mittwoch, 6. April 2005 17:39
An: users@cocoon.apache.org
Betreff: Re: AW: AW: AW: AW: Design note - Building a template mechanism



let me give an exaple 

your home.xhtml is in
/demosite/home.xhtml

from a page in http://localhost:8080/cocoon/demosite/page1.xhtml
a link to home will be : href="page1.xhtml"

form a page in /demosite/foo/page2.xhtml a link to home will be : href="../page1.xhtml"

and so on

if this link is a reusable code fragment then you have tou use not relative but full path
like

href="/cocoon/demosite/homex.html"

and this must change if you have to move from dev env to production where the home is

http://www.foo.com/home.xhtml

and the reference to home can be "/home.xhtml" from any page




On Wed, 6 Apr 2005 gounis@osmosis.gr wrote:

> On Wed, 6 Apr 2005, Messing, Elad wrote:
> 
> > Hello again Stavors
> > 	I am now looking at your example. It works great BTW, and in deeded the new features
are worth the wait :)
> > 	I was wondering why you use the "base-url" global (that needs to be changed for
every installation) if you can just use the regular relative paths that the web browser maintain
for you. 
> > 	I mean - all of your links are under the root directory of Othello , so why bother
?
> > 
> > 	Thanks
> > 
> 
> 
> 
> in dev-env your site is under :8080/cocoon/blah/othello/foo/bar
> 
> but in production this site maybe will live under
> 
> http://www.domain.org/foo/bar
> 
> so the need is to have a <a href="?????">home</a>
> 
> than can point to your /index.xhtml from any page of your web site
> 
> so using a base-url variable i can set a full uri that point to the 
> page i want either i'm in dev-env or in production
> 
> its a common problem when you hont with a reusable code to point to 
> your home from any page in deeper level in your site
> 
> 
> 
> 
> > Elad
> > 
> > -----UrsprΓΌngliche Nachricht-----
> > Von: gounis@osmosis.gr [mailto:gounis@osmosis.gr]
> > Gesendet: Dienstag, 5. April 2005 17:34
> > An: users@cocoon.apache.org
> > Betreff: Re: AW: AW: AW: Design note - Building a template mechanism
> > 
> > 
> >  hi
> > 
> > i have update this wiki page
> > http://wiki.apache.org/cocoon/TemplateBasedWebSite
> > 
> > now there is an new sample as attachement
> > 
> > 
> > regards
> > 
> > stavros
> > 
> > On Tue, 5 Apr 2005 gounis@osmosis.gr wrote:
> > 
> > > On Tue, 5 Apr 2005, Elad Messing wrote:
> > > 
> > > >  Hi again.
> > > > 	I have added the fixes. I am not sure that they are all correct, as I
am quite a newbie.. They do however make it work :)
> > > > 	Feel free to remove what is not needed.
> > > > 
> > > > 	Hope it will help somebody someday - like it helped me..
> > > > 
> > > > Elad
> > > 
> > > thnx
> > > 
> > > i'll post the link for the demo site in this thread afternoon
> > > 
> > > 
> > > 
> > > --stavros
> > > 
> > > > 	 
> > > > 
> > > > -----UrsprΓΌngliche Nachricht-----
> > > > Von: gounis@osmosis.gr [mailto:gounis@osmosis.gr]
> > > > Gesendet: Dienstag, 5. April 2005 13:26
> > > > An: users@cocoon.apache.org
> > > > Betreff: Re: AW: AW: Design note - Building a template mechanism
> > > > 
> > > > On Tue, 5 Apr 2005, Elad Messing wrote:
> > > > 
> > > > > I understand.
> > > > > So - I would very much like to learn the new implementation ! A demo
site could be great !
> > > > > 
> > > > > In Parallel - I am going through the example in the wiki and finding
some errors in code. What do you think about me adding the fixes to make the example work
by copy paste ? Is it needed ? 
> > > > > 
> > > > > Elad
> > > > > 
> > > > 
> > > > 
> > > > your  comments/fixes are welcome
> > > > 
> > > > :-)
> > > > 
> > > > 
> > > > > -----UrsprΞ“ΞŒngliche Nachricht-----
> > > > > Von: gounis@osmosis.gr [mailto:gounis@osmosis.gr]
> > > > > Gesendet: Dienstag, 5. April 2005 12:22
> > > > > An: users@cocoon.apache.org
> > > > > Betreff: Re: AW: Design note - Building a template mechanism
> > > > > 
> > > > > On Tue, 5 Apr 2005, Elad Messing wrote:
> > > > > 
> > > > > > Hello Stavros and all
> > > > > > 	Thanks for the reply. I think I understand the usage of it

> > > > > > as you explained in the "TemplateBasedWebSite" wiki page.
> > > > > > 	I also found the Othello example in the Scratchpad. 
> > > > > > 
> > > > > > 	Currently I am studying the wiki example, trying to build 
> > > > > > the same in my environment.
> > > > > > 
> > > > > > 	Do you think the wiki example is still valid today, or you

> > > > > > would have done this in a different way in Cocoon 2.1.7 ? 
> > > > > > This is actually my question :)
> > > > > > 
> > > > > > 	Thanks
> > > > > > 
> > > > > > Elad
> > > > > > 
> > > > > 
> > > > > the idea described in wiki is the same, the impementation has 
> > > > > changed
> > > > > 
> > > > > (more features, cleaner code etc)
> > > > > 
> > > > > 
> > > > > 
> > > > > > 	
> > > > > > 
> > > > > > -----Ursprόngliche Nachricht-----
> > > > > > Von: gounis@osmosis.gr [mailto:gounis@osmosis.gr]
> > > > > > Gesendet: Dienstag, 5. April 2005 11:38
> > > > > > An: users@cocoon.apache.org
> > > > > > Betreff: Re: Design note - Building a template mechanism
> > > > > > 
> > > > > > 
> > > > > > hi elad
> > > > > > 
> > > > > > i'm using this approach to create static web static web sites
the goals are:
> > > > > > - yu  have one layout file (.xhtml). then i get the content

> > > > > > form each request (requested web page) and put it inside 
> > > > > > this layout (now i'm close to have pages (web requests) that

> > > > > > make an exception and use an alternative
> > > > > > layout)
> > > > > > 
> > > > > > - you can define blocks with static content (html fragments)

> > > > > > that can be reused in any page
> > > > > > 
> > > > > > - you can define your own elements that are translated to 
> > > > > > complex html
> > > > > > 
> > > > > > - there is a simple html 2 pdf transformation, so you are 
> > > > > > able to server content pages as simple pdfs
> > > > > > 
> > > > > > - you can change the theme for your site
> > > > > > 
> > > > > > all this out of the box without to touch the sitemap.xmap
> > > > > > 
> > > > > > there is a sample in cocoon sample /scratchpad called 
> > > > > > Othello than demostrate all this but it's quite old
> > > > > > 
> > > > > > i have a new version with many modification but i dont have

> > > > > > found time to make a pacth in bugzilla
> > > > > > 
> > > > > > if you want i can pack my working directory with some demo 
> > > > > > site to take a look
> > > > > > 
> > > > > > 
> > > > > > regards
> > > > > > -stavros
> > > > > > On Tue, 5 Apr 2005, Elad Messing wrote:
> > > > > > 
> > > > > > > Hello All !
> > > > > > > 	I am now in the design phase of the web-application I
am working on.
> > > > > > > 	The application will have a fixed structure - header,

> > > > > > > footer, content in the middle, and menu on the side - and

> > > > > > > I am looking for the
> > > > > > best
> > > > > > > practice to build this template mechanism in Cocoon.
> > > > > > > 
> > > > > > > 	I have found in the wiki this page 
> > > > > > > :http://wiki.apache.org/cocoon/TemplateBasedWebSite but
- 
> > > > > > > It is from
> > > > > > 10.2003
> > > > > > > - and mention working with version 2.0.4. 
> > > > > > > 	I was wondering whether this is still a best practice
or 
> > > > > > > maybe a new better feature allows for another practice
- which is better.
> > > > > > > (might be
> > > > > > that
> > > > > > > the Xinclude is involved ? Not sure)..
> > > > > > > 
> > > > > > > 	Thanks in advance.
> > > > > > > 
> > > > > > > Elad Messing
> > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > > 
> > > > > > ------------------------------------------------------------
> > > > > > --------
> > > > > > - To unsubscribe, e-mail: 
> > > > > > users-unsubscribe@cocoon.apache.org
> > > > > > For additional commands, e-mail: 
> > > > > > users-help@cocoon.apache.org
> > > > > > 
> > > > > > 
> > > > > > ------------------------------------------------------------
> > > > > > --------
> > > > > > - To unsubscribe, e-mail: 
> > > > > > users-unsubscribe@cocoon.apache.org
> > > > > > For additional commands, e-mail: 
> > > > > > users-help@cocoon.apache.org
> > > > > > 
> > > > > > 
> > > > > 
> > > > > 
> > > > > --------------------------------------------------------------
> > > > > ------- To unsubscribe, e-mail: 
> > > > > users-unsubscribe@cocoon.apache.org
> > > > > For additional commands, e-mail: users-help@cocoon.apache.org
> > > > > 
> > > > > 
> > > > > --------------------------------------------------------------
> > > > > ------- To unsubscribe, e-mail: 
> > > > > users-unsubscribe@cocoon.apache.org
> > > > > For additional commands, e-mail: users-help@cocoon.apache.org
> > > > > 
> > > > > 
> > > > 
> > > > 
> > > > ----------------------------------------------------------------
> > > > ----- To unsubscribe, e-mail: 
> > > > users-unsubscribe@cocoon.apache.org
> > > > For additional commands, e-mail: users-help@cocoon.apache.org
> > > > 
> > > > 
> > > > ----------------------------------------------------------------
> > > > ----- To unsubscribe, e-mail: 
> > > > users-unsubscribe@cocoon.apache.org
> > > > For additional commands, e-mail: users-help@cocoon.apache.org
> > > > 
> > > > 
> > > 
> > > 
> > > ------------------------------------------------------------------
> > > --- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail: users-help@cocoon.apache.org
> > > 
> > > 
> > 
> > 
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message