>> GreenByte.info By Nick Tong (quiksilv) | Supported by: TalkWebSolutions.co.uk

Multipul name spaces in fusebox for lexicons

I've just started using the coldspring lexicon for fusebox5 which is very nice indeed (more to come on this). One of this things you have to do when using lexicons is declare the name space (xmlns) and path for the lexicon:

<circuit access="internal" xmlns:cs="coldspring/">

You can then use the name space to reference you lexicons:

<cs:get bean="categoryService" returnvariable="variables.categoryService" coldspringfactory="application.serviceFactory"/>
NB: 'get' is the name of your lexicon

Okay this all works fine but what if you have 2 different lexicon directories, one for coldspring and one for custom tags?

Well you can quite easily declare more than one name space:

<circuit access="internal" xmlns:ct="ct/" xmlns:cs="coldspring/">

Then just use your require name space to call you lexicon:

<cs:get bean="categoryService" returnvariable="variables.categoryService" coldspringfactory="application.serviceFactory"/>
<ct:mailform to="info@x.com" from="info@xcom" subject="Nice to see you" />


 

Related Blog Entries

Comments
nick tong's Gravatar It's worth noting that in fusebox 5.1 you have a new parameter to place in the fusebox.xml.cfm file::
<parameter name="lexiconPath" value="/fusebox5/sharedlexicon" />

This allows you to use a single lexicon folder (relative or absolute). This saves you having lots of duplicated lexicon folders under each app. You just plonk them all in a shared folder.
# Posted By nick tong | 15/03/07 14:29 | Report abusive comment
BlogCFC was created by Raymond Camden. This blog is running version 5.5.1.