how can i have my content displayed in 2 different ways ?
hello all, i have my content in zope in a structure like this : data/animals/lion data/animals/coyote data/animals/elephant and would like to have 2 ways (in fact n ways) of displaying the information i could make 2 methods in the animals folder for example and have my urls look like data/animals/lion/bluepage data/animals/lion/redpage bu i would like to / love to be able to make it like this : bluepage/animals/lion redpage/animals/lion can i do that ? if yes, how ? and does it work with subfolders ? sorry for all thos questions, but i'd prefer to do it the right way ;-))) $ven
Sven Fischer wrote:
i have my content in zope in a structure like this :
data/animals/lion data/animals/coyote data/animals/elephant
and would like to have 2 ways (in fact n ways) of displaying the information
i could make 2 methods in the animals folder for example and have my urls look like
data/animals/lion/bluepage data/animals/lion/redpage
bu i would like to / love to be able to make it like this :
bluepage/animals/lion redpage/animals/lion
can i do that ? if yes, how ? and does it work with subfolders ?
Have you checked out NIP's PathHandler product? http://www.zope.org/Members/NIP/PathHandler if bluepage is a PathHandler, it could translate a bluepage/animals/lion to a data/animals/lion/bluepage That's the simplest solution I could think of right now. And the elegance is ok, imho. You could take a look at the sources to see how PathHandler does its __bobo_traverse__ hth, Danny
bluepage/animals/lion redpage/animals/lion
can i do that ? if yes, how ? and does it work with subfolders ?
Hi! Ever heard about acquisition magic? ;-) You can just have two different folders "bluepage" and "red page" that contain the different layout. Your folder hierarchy could look like that: ROOT |_ bluepage |_ redpage |_ animals |_ lion |_ elephant Then you can just do "redpage/animals/elephant"! The animals folder is acquired from the root when it is called in redpage, so this works! Joachim.
participants (3)
-
Danny William Adair -
Joachim Werner -
Sven Fischer