Dashboard > blojsom 3.0 > ... > Plugins > Macro Expansion Plugin
  blojsom 3.0 Log In   View a printable version of the current page.  
  Macro Expansion Plugin
Added by David Czarnecki, last edited by David Czarnecki on Jul 09, 2007
Labels: 
(None)

Description

The macro expansion plugin expands $macro$ references that it finds in your blog description and expands them into its full form.

It is a timesaver plugin to save you from repeatedly typing in portions of blog entries that you use over and over again. For example, you might want to be able to expand friend's names into URLs that point to their blogs.

Installation and Setup

In your /WEB-INF/classes/blojsom-plugins.xml file, add the following:

<bean id="macro-expansion" class="org.blojsom.plugin.macro.MacroExpansionPlugin" init-method="init" destroy-method="destroy">
    </bean>
    <bean id="macro-expansion-admin" class="org.blojsom.plugin.macro.admin.MacroExpansionAdminPlugin" init-method="init" destroy-method="destroy">
        <property name="servletConfig">
            <ref bean="servletConfigFactoryBean"/>
        </property>
        <property name="authorizationProvider">
            <ref bean="authorizationProvider"/>
        </property>
        <property name="resourceManager">
            <ref bean="resourceManager"/>
        </property>        
        <property name="fetcher">
            <ref bean="fetcher"/>
        </property>
    </bean>

You may then add "macro-expansion" to one of the flavor-based plugin chains.

Required Permissions

A user must have the following permissions in order to use the macro administration plugin.

macro_expansion_admin_permission

Usage and URL Parameters

Usage

In your entries, simply reference your macros using the $macro$ syntax. The $macro$ references are also case insensitive.

For example, "... and then he said, $ypm$ " in your blog description would expand to "... and then he said, Yeah, Pretty Much "

Site running on a free Atlassian Confluence Open Source Project License granted to blojsom. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators