The Toolkit for Online Communities
17459 Community Members, 1 member online, 1007 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : integrating i.e. blogger include into etp... : One Message

Forum OpenACS Q&A: Re: integrating i.e. blogger include into etp...

Posted by Lars Pind on

What I did for http://www.collaboraid.biz was to create an ETP  content type, which takes fully templated ADP code, and runs it through the templating system.

Then I have this in ETP on the http://www.collaboraid.biz/developer/ page:

<div style="float: right; width: 50%; border: 1px solid #cccccc; padding: 8px;">
<%=[lars_blog_get_as_string -url "/developer/blog"] %>

The only downside is that you have to be careful with what you put in those pages, since it will get interpreted, and thus may break.

Here's the code that handles it:

foreach element { content } {
    if { [catch {
        set code [template::adp_compile -string $pa($element)]
        set pa($element) [template::adp_eval code]
    } errMsg] } {
        global errorInfo
        ns_log Error "$errMsg while evaluating ETP ADP page at [ad_return_url]: \n$errorInfo"