[PEAK] Example using sitemap.xml and bulletins

Phillip J. Eby pje at telecommunity.com
Thu Mar 24 22:27:11 EST 2005


At 05:28 PM 03/24/2005 -0100, Tiago Cogumbreiro wrote:
>Hello list,
>
>I've read, done and even corrected the
>http://peak.telecommunity.com/DevCenter/PeakWebHowTo however I'm still
>having a little problems understanding how the sitemap elements
><contents> and <components> work.
>
>Could someone please give me an example of a sitemap.xml for the 'bulletins'?

Not right now, but maybe this will be helpful:

http://www.eby-sarna.com/pipermail/peak/2004-October/001865.html

<location> defines a fixed URL location, and you can define views on it to 
make statically-located pages.  <content> groups views that apply to one or 
more object types.  <container> defines how dynamic children of a location 
will be looked up.  So, you would typically reference DM's as containers, 
within a location that you want to be the base location, e.g. 
/Users/username to be the URL of a particular user object.  Then, you 
define a <content> block for the type of object returned by that DM, that 
contains <view> entries to define what pages are available as sub-locations 
of the user, like /Users/someUser/show (e.g. if you have a view named 
"show" for user objects).


>This mail was the closer I could get:
>http://www.eby-sarna.com/pipermail/peak/2004-November/001895.html
>
>The problem is the bulletins has a central component the App. How
>would I access its data managers?

Well, you can create them directly in the sitemap as is done in that post, 
or you can make a class that subclasses both App and web.Location, then use 
<location class="BulletinsWebApp"> or whatever you called the new 
class.  But there may be easier ways; I'll try to carve out some time this 
weekend to give you a better answer to this email, as I need to go pack for 
my return trip from PyCon.




More information about the PEAK mailing list