in reply to Re^2: includes in nodelets (push)
in thread includes in nodelets

Thanks Tye and ambrus. I think it'll be a while before I'm good enough to join pmdev, but I'll start reading the links from ambrus anyway.


I humbly seek wisdom.

Replies are listed 'Best First'.
Re^4: includes in nodelets (!pmdev)
by tye (Sage) on Aug 29, 2007 at 14:24 UTC

    You don't need to be in pmdev to implement a push-model templater. You keep (on your computer) the boilerplate and the list of nodes to update and you put in the nodes to be updated transparent markers to surround where you want the boilerplate to be inserted, like "<!--TOC:-->...<!--:-->".

    Then you write a small Perl script that iterates over the list of node IDs, uses an XML ticker to grab the node's current content, use a regex to update the boilerplate content, preserving the markers, then POST the updated node.

    And PerlMonks::Mechanized (beta) is probably at least a good place to start.

    Working in pmdev is much less convenient and much more frustrating so it is good to not have to implement this in that environment.

    - tye        

      Ah, I get it. I think I was thinking something more complicated based on how I was reading ambrus' description of mediawiki templates invalidating caches.

      As another example of includes (slightly more general than templates, or maybe not) SiteDocClan has a wonderful table in Levels of Monks, which I assumed was reused in Voting/Experience System (though now I notice they're not as much the same table as I thought). Maybe this isn't the best example as the experience levels aren't likely to change frequently, but if they did, how would SiteDocClan keep them in synch?

      The push solution is a fine solution and has it's merits. I was just suggesting an alternate. I'm throwing out the idea for wiser monks to think about.


      I humbly seek wisdom.