[Moin-user] partial page includes.

Adam Shand adam at personaltelco.net
Sun Jul 7 18:27:01 EDT 2002


I'm working with Seth on enhancing the Include macro to be able to abort
when it see's  "----". This would be really nice for our site (for
example I could include the most recent X entries from our RecentNews
page on our FrontPage and adjust what's included by just moving the
first "----").

He poked around the source for me but not being familiar with Moin had
some questions.  Anyway, I was hoping for some input on how best to go
about doing this.  Below are his thoughts on the matter:

"You could modify get_raw_body() in Page class to do read lines and then
do a string.index('----') to find if each and every line has that
string, if it does then stop reading.  But it's going to do that with
EVERY page that get's loaded. unless you modified it to pass a flag on
when to do it and when not to. What I *think* is supposed to happen is
you're supposed to build a formatter instance and the formatter will be
applied to the page during it's loading, before it gets sent to the
client via the Page.SendPage() def."

Thanks,
Adam.

-- 
"Make the invisible visible. Let people see." -- Bruce Sterling





More information about the Moin-user mailing list