On Monday, 3 September 2012 00:51:47 UTC-5, Andrew W wrote: > > Hi Massimo, > > Some questions on auth.wiki, in anticipation of some details in the book. > Have you finalised the syntax for adding components ? >
I think we can keep @{component:url} > How do I embed media eg images? Do I follow the markmin reference doc, or > is it a combo of the two: I've added the media to the page > [[some image @////5/slug.jpg right 200px]] or [[some image > http://www.web2py.com/examples/static/web2py logo.png right 200px]] or > just @////5/slug.jpg. > The syntax is @/app/controller/function/args maps into URL('app','controller','function',args=args) and you can omit app/controller and args. Thus simply @///function. This can be used as an URL anywhere in the markmin source. If it is the URL of an image or a video or an audio, file, markmin will embed the content sing the appropriate tag (<img>, <video>, <audio>). > I'm updating pages but they don't get refreshed - is there caching on by > default ? This might have been causing my earlier issue as I'm not seeing > an updated page. > How do you update them? The html is cached in db but should be updated when you use the edit action. > Does you have to be in default/index to call auth.wiki() ? > No. But it should be exposed by one single web2py action. > Do users have to log in to see the wiki pages ? The login screen comes up > by default. I would like a wik page to come up by default. > No, unless you set permissions=True. The caveat is that when you first start the app there are no wiki pages so nothing to see. Web2py assumes you must create some pages and therefore requires login to do that. After you create some pages (or only one), then they can be accessed publicly (unless permissions=True and you set restrictions on individual pages). I will soon document this in the book a little better. > > Thanks > > Andrew W > > >> wiki media are embedded with @////5/slug.jpg where 5 is the id of the >> media file. >> >> You can embed components with @{component:controller/function/args) -> >> LOAD('controller','function',args=args) >> (not sure about this syntax, may still change it) >> >> --