got it working with this:
import StringIO
from gluon.template import render
def index():
if request.args:
pageurl='/'.join(request.args)
try:
cmspages = db(db.cmspages.pageurl==pageurl).select().first()
response.title = cmspages.title
response.meta.keywords = cmspages.metakeywords
response.meta.description = cmspages.metadescription
except:
raise HTTP(404)
display_template=db(db.pagetemplate.id==cmspages.pagetemplate).select()[0]
view_text=StringIO.StringIO(display_template.pagecontent)
cmscontent = XML(render(cmspages.pagecontent, context=globals()))
return response.render(view_text,dict(cmscontent=cmscontent))
else:
return redirect(URL('cms2py', 'pages', 'index', args=('home')))
On Friday, 18 October 2013 14:12:23 UTC+1, Anthony wrote:
>
>
> the trouble i have though, is that the table field called "pagecontent",
>> which i am calling in the view/template contains helpers and these
>> currently don't get executed without eval. In my testing, i have
>> "pagecontent" containing:
>>
>> MARKMIN("**My Site**")
>>
>>
> If you want to use the web2py template rendering system, then pagecontent
> needs to contain template code, so it would have to be:
>
> {{=MARKMIN("**My Site**")}}
>
> Anthony
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.