[web2py] Re: Markmin components

2014-01-16 Thread Janko Strusa
How can I implement this in a view. I am not sure how to call that markmin action to be used instead of MARKMIN helper. Dana srijeda, 8. svibnja 2013. 17:23:24 UTC+2, korisnik Massimo Di Pierro napisao je: > > There is an "official" syntax for this. > > @{component:controller/function/args}

[web2py] Re: Markmin components

2013-05-08 Thread villas
Thanks On Wednesday, May 8, 2013 4:23:24 PM UTC+1, Massimo Di Pierro wrote: > > There is an "official" syntax for this. > > @{component:controller/function/args} > > To enable this and enable OEMBED I do: > > def markmin(body): > from gluon.contrib.autolinks import expand_one > def co

[web2py] Re: Markmin components

2013-05-08 Thread Massimo Di Pierro
There is an "official" syntax for this. @{component:controller/function/args} To enable this and enable OEMBED I do: def markmin(body): from gluon.contrib.autolinks import expand_one def component(text): items = text.split('/') controller, function, args = items[0],

[web2py] Re: Markmin components

2013-05-08 Thread villas
For anyone interested in my monologue... Function to my previous ideas, a function as follows could handle both internal and external URLs. I also included a simple check for allowed domains: def __component(text): if text and text.lower().strip().startswith('http'): from urlparse

[web2py] Re: Markmin components

2013-05-07 Thread villas
I can do something like this... mytext = """ ``default/get_cms_article/4``:component """ def __component(text): items = text.split('/') controller, function, args = items[0], items[1], items[2:] return LOAD(controller, function, args=args, ajax=True).xml() MARKMIN_ENV = dict( c