BlogMatrix
 

Internals: configuring admin-post for a particular application

edit David P. Janes 2006-07-13 12:48 UTC add comment  ·  ·  ·

This post is about the internals of how the BlogMatrix Platform works.

One of the most complex pieces of code in the BlogMatrix Platform is the admin-post command, the command that lets you make entries (The most complicated piece is genpage, which builds and caches webpages). Much of the complexity is because it can be configured in many different ways, depending on what the client application is (we do a lot more than blogging).

Much of the configuration comes from a data element called self.sections, which tells what to add and what strings to use and so forth. When bundles are added to a post, they can selectively

Right now I'm working on a Sales Lead bundle, for demonstration purposes. To make this more clear, instead of "Edit Entry" we want to display "Edit Sales Lead"; and instead of displaying "Title" for the title of the entry, we want to use "Opportunity". Here's how we do it (in blogmatrix.cfg):

bundle_saleslead: {
    "title" : "Sales Lead Tracking",
    "bundle_id" : "saleslead",
    "is_edit_hidden" : True,

    "post_sections" : {
        "TITLE" : "Edit Sales Lead",
        "TITLE_TITLE" : "Opportunity",
    },

Also note that the is_edit_hidden flag means it won't display on the "Add Structured Data" sidebar and once added, it can't be deleted. How do we add it in the first place, you ask? Just add to the post URI:

 /:admin/create/post/?bundle=saleslead,person,phone