
waldo at vqronline
Jan 30, 2008, 12:44 PM
Post #1 of 12
(7958 views)
Permalink
|
Folks, I've seen some really useful-looking template elements (or is it "element templates"?) on both the Bricolage site [1] and Building Brics [2], but I don't have the faintest clue of what to do with them. I've downloaded a few, notably publish_daily_archive.mc, which I hope to modify to create seasonal archives, one for each issue that we publish quarterly. Combing through my Bricolage install for *other* .mc files, figuring that'd be the place to put it, I dropped it into /data/burn/comp/oc_1, restarted Bricolage, and tried pulling it up under Template -> Find Templates. It didn't show up. No problemo -- I'd just noticed Template -> New Template, and figured I could add it through the web interface. But then I was prompted to select from an existing list of element types (book_profile, book_review, column, cover, etc.) I didn't want any of those element types. I wanted to make a *new* element that's none of these types. Maybe I needed to use Admin -> Publishing -> Element Types to make a new element type and then use *that* to add a new element template. I created a new "Issue" element type (of type "story"). That went just fine, so I headed back to Template -> New Template. I create a new template there, which ends up titled issue.mc, but it fails with a dump of error messages that's all Greek to me: ---cut--- Template compile failed: Error during compilation of <anonymous component>: Global symbol "$action" requires explicit package name at (eval 581) line 70, <GEN127> line 348. Stack: [/usr/lib/perl5/ site_perl/5.8.5/HTML/Mason/Interp.pm:631] [/usr/local/bricolage/lib/ Bric/Util/Burner/Mason.pm:355] [/usr/local/bricolage/lib/Bric/Util/ Burner.pm:1524] [/usr/local/bricolage/lib/Bric/App/Callback/Profile/ Template.pm:567] [/usr/local/bricolage/lib/Bric/App/Callback/Profile/ Template.pm:98] [/usr/lib/perl5/site_perl/5.8.5/Params/ CallbackRequest.pm:294] [/usr/lib/perl5/site_perl/5.8.5/MasonX/Interp/ WithCallbacks.pm:119] [/usr/lib/perl5/site_perl/5.8.5/HTML/Mason/ ApacheHandler.pm:869] [/usr/lib/perl5/site_perl/5.8.5/HTML/Mason/ ApacheHandler.pm:823] [/usr/local/bricolage/lib/Bric/App/Handler.pm: 314] [/dev/null:0] ---cut--- And that's where I hit a dead end, with no ideas for alternate approaches and no apparent way forward. The underlying problem, I suspect, is that I don't understand this hierarchy of templates, and I don't know how to figure them out. What's the difference between an element and an element type? A template and a template element? I've read through the FAQs, the Perl.org articles, and the mailing list archives, and though I may have actually encountered an explanation somewhere along the line, I just feel so confused that I'm not sure I understood them. Could somebody point me to a resource where I could learn about all of this? I feel more than a little foolish asking such elementary questions here, so I have to remind myself that this is a general users list and, despite the discussion generally being at a far higher level than this, everybody had to learn this stuff at one time or another. :) Best, Waldo [1] http://www.bricolage.cc/templates/ [2] https://www.buildingbrics.com/trac/browser --- Virginia Quarterly Review One West Range, Box 400223 University of Virginia Charlottesville, VA 22904-4223
|