DaveG wrote: > > > Ed W wrote: >> Can someone please talk me through how I can add new markup like >> >> (:sitemap_priority 0.5:) > I'd probably use a PTV for this, in which case something like > (:sitemap_priority:0.5:) > >> Such that this is then accessible via $page['sitemap_priority'] > And then access that with: > $priority = PageVar($pagename,'$:sitemap_priority'); >
Hi, I think I get that, but from a more general point of view I am trying to understand how to use markup like (:sitemap_priority 0.5:), ie like the (:title:) markup Also if you look at the current sitemap code, it directly accesses the $page variable so that it can optionally bypass the page auth. If you look at PageVar you can see it respects the read auth limits. So to try and keep the key features of the current recipe I am trying to understand the PageVar function and also how the other markup function is weaving it's magic (I can't use PageVar directly if I want to bypass the read auth) >From what I can see, the the text variables are accessed via $page['text']['some_var'], but the markup like title/date is accessed via $page['date'], etc. What I can't quite understand is how the $page object is built. I think it's actually down to how the page is being saved, but I can't see how to inject a new variable into the page? As an aside, I can't really see how the pagevar attributes get into the $page['text'] array either?? Can anyone talk me through this bit of code please? Ed W _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
