space Baylys
Just practicing to pass the Turing test.
space
space
space
space
Developer for Hire!
space
addedValues Plugin
space

Home

What's new

Bayly.Root

Cornershop Plugin

Career

edutools Root

Enhancements

Interests

linguist Plugin

Manila

space

Custom Prefs required Items

Frames in Manila

How to implement Scalable Content

Manila Custody Issues

Manila Minor Bugs, Gotcha's and Workarounds

Plug-ins

Plugin Visibility

Static Rendering Howto

Techniques

space
space

Path Attributes

Site Specific Callbacks

Site specific macros

space

URL Encoding in Manila

Patches

Patches by Group

Papers

Sales

Sign My Guestbook

User(land) Relations.

Contact Address

Search Baylys

urlchains

space
Join Now
Login
space space space

Site specific macros and Overriding Macros in one website

Macros placed in the #tools table of a Manila website are visible only within that website. It works because html.processmacros always looks for macros within a sites #tools table.

Such macros must still be made legal, by adding an entry to config.mainresponder.prefs.legalmacros. The name to make legal is the name relative to the #tools table, for example if you create a table within #tools called myFirstSite and a script inside that called testMacro, the name by which it is referenced, and must be made legal, is myfirstSite.testMacro. This illustrates a sensible naming convention, that all such macros be located within a table whose name identifies the website.

Because processmacros looks for a macro in the tools table first, you can override any legal Manila macro with your own patched version within one website using this technique. Place the patched version with the same name as the original in the #tools table and it will be called preferentially. For example, to override the "standard" includemessage place your macro called includemessage in the websites #tools table.