Navigation

SDL Tridion Lisp Mediator

Long used by Computer Science students and AI researchers, Lisp is one awesome language.

Inspired by Paul Graham's story about Lisp's role Viaweb, an early online store platform, and having recnetly seen Lambda Meme's post on dynamic websites I wanted to wire-up an SDL Tridion Lisp mediator.

I have the basic get-packageitem() and set-stringitem() methods, but haven't implemented Template Building Block (TBB) parameters just yet.

Here's the basic flavor of the parenthetical-and-recursive-syntax that everyone loves from computer science:
(html 
 (head 
   (title (page-title)))
     (body (h1 component-title)
       (div get-componentpresentation(componentpresentation component-id template-id)))))


To install, update the templateTypeRegistry node in %TRIDION_HOME%\config\Tridion.ContentManager.Config by adding a content handler:
<add contenthandler="Tridion.ContentManager.Templating.Dreamweaver.DreamweaverContentHandler, Tridion.ContentManager.Templating, Version=6.1.0.994, Culture=neutral, PublicKeyToken=360aac4d3354074b" hasbinarycontent="false" id="8" mimetype="text/x-tcm-Lisp" name="Lisp">
 <webdavfileextensions>
  <add fileextension="lisp" itemtype="TemplateBuildingBlock">
    </add></webdavfileextensions>
</add>

Under mediators add:
<mediator assemblypath="%TRIDION_HOME%\Tridion\bin\LispMediator.dll" matchmimetype="text/x-tcm-Lisp" type="Tridion.Extensions.Mediators.LispMediator">

Enough talk, let's see the code.

1 comment:

  1. Please send me the code.. the link posted doesn't really work. I get some weird error page

    ReplyDelete

Feel free to share your thoughts below.

Some HTML allowed including links such as: <a href="link">link text</a>.