sorry, I was considering on using the same code to the wiki pages in the markmin syntax so that you could also make this kind of links in wiki pages. [[name http://example.com, args=[], vars={}]]
Other thing, you might want to consider... check your example page_name /controller/action/arg1/arg2?a=b instead of b if you have a string such as 'welcome page', it won't work because of the white space. page_name /controller/action/arg1/arg2?a='Welcome page' idea: changing the meta-menu separator character to '|' or '||' example: page_name|/controller/action/arg1/arg2?a='Welcome page' On Jan 4, 4:33 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > Are we still talking about menu links? Why should a menu item perform > a post? > > On Jan 4, 10:31 am, blackthorne <francisco....@gmail.com> wrote: > > > > > fine with me > > > any solution for POST method? > > > On Jan 4, 4:25 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > I have no objection to local URL. but the author of the menu may not > > > be the administrator therefore we cannot eval(...) text in the meta- > > > menu. This poses restrictions on what we can put in there. I suggest > > > we just allow > > > > page_name /controller/action/arg1/arg2?a=b > > > > and if this starts with / this is interpreted as a local URL. No need > > > to specify app name. > > > > On Jan 4, 10:09 am, blackthorne <francisco....@gmail.com> wrote: > > > > > no local urls for secure mode... yes/no? > > > > > On Jan 4, 3:51 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > > > There cannot be eval in there. The plugin may be in level=1 (secure > > > > > mode). > > > > > > On Jan 4, 8:38 am, blackthorne <francisco....@gmail.com> wrote: > > > > > > > Broken here: > > > > > > In [21]: url="\'f\',args=[\'x\',\'y\'],vars=dict(z=\'t\')" > > > > > > > In [22]: [part.strip('\'').strip('\"') for part in > > > > > > url[4:].split(',')] > > > > > > Out[22]: ["args=['x", "y']", "vars=dict(z='t')"] > > > > > > > Just use: > > > > > > elif url.lower().startswith('url:'): > > > > > > url=eval("URL(" + url[4:] + ")") > > > > > > > This was my first solution, it works well with args and vars. > > > > > > This case works, tested against: > > > > > > Home url:'homepage','plugin_wiki','index' > > > > > > Articles page:articles > > > > > > Links url:'homepage','default','links' > > > > > > Test url:'f',args=['x','y'],vars=dict(z='t') > > > > > > Projects url:'f',args=['x','y'] > > > > > > > Generated:http://127.0.0.1:8000/homepage/plugin_wiki/indexhttp://127.0.0.1:8000... > > > > > > > The only small gotcha is white space absence being required because > > > > > > of > > > > > > the regular expression being used to "parse" the meta-menu lines... > > > > > > > On Jan 4, 1:13 pm, blackthorne <francisco....@gmail.com> wrote: > > > > > > > > That way, you can use URL() to pass args [] and vars {} under the > > > > > > > web2py way. Have to test it though... > > > > > > > > On Jan 4, 12:24 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > > > > > > but why not simply > > > > > > > > > url:homepage/plugin_wiki/index > > > > > > > > > or > > > > > > > > > localurl:homepage/plugin_wiki/index > > > > > > > > > and no quotes? > > > > > > > > > On Jan 4, 6:00 am, blackthorne <francisco....@gmail.com> wrote: > > > > > > > > > > instead of having common strings ready to be passed as > > > > > > > > > arguments, you > > > > > > > > > would get strings that contain quotes in it. I guess... > > > > > > > > > > Consider my example: > > > > > > > > > home url:'homepage','plugin_wiki','index' > > > > > > > > > > you will get: > > > > > > > > > In [9]: url="url:\'homepage\',\'plugin_wiki\',\'index\'" > > > > > > > > > > In [10]: [part.strip('\'') for part in url[4:].split(',')] > > > > > > > > > Out[10]: ['homepage', 'plugin_wiki', 'index'] > > > > > > > > > > In [11]: [part for part in url[4:].split(',')] > > > > > > > > > Out[11]: ["'homepage'", "'plugin_wiki'", "'index'"] > > > > > > > > > > Best regards > > > > > > > > > > On Jan 4, 11:49 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > > > > > > > > Why > > > > > > > > > > > + elif url.lower().startswith('url:'): > > > > > > > > > > + url=URL(*[part.strip('\'') for part > > > > > > > > > > in > > > > > > > > > > url[4:].split(',')]) > > > > > > > > > > > and not > > > > > > > > > > > + elif url.lower().startswith('url:'): > > > > > > > > > > + url=URL(*[part for part in > > > > > > > > > > url[4:].split(',')]) > > > > > > > > > > > Why the quotes? > > > > > > > > > > > On Jan 3, 9:07 pm, blackthorne <francisco....@gmail.com> > > > > > > > > > > wrote: > > > > > > > > > > > > Because it may not be obvious that the previous message > > > > > > > > > > > includes a > > > > > > > > > > > patch, here is from another > > > > > > > > > > > source:http://www.speedyshare.com/files/26051957/download/patch.plugin%20wik... > > > > > > > > > > > > thank you > > > > > > > > > > > > On Jan 4, 2:51 am, Francisco Gama > > > > > > > > > > > <blacktho...@ironik.org> wrote: > > > > > > > > > > > > > this patch allows you to define custom links using the > > > > > > > > > > > > URL() helper in the meta-menu of plugin_wiki, so you > > > > > > > > > > > > should apply it to: > > > > > > > > > > > > models/plugin_wiki.py > > > > > > > > > > > > > the syntax used is "Title url:URL_args" > > > > > > > > > > > > > example: > > > > > > > > > > > > home url:'homepage','plugin_wiki','index' > > > > > > > > > > > > Articles page:articles > > > > > > > > > > > > Links url:'homepage','default','links' > > > > > > > > > > > > > notice that after "url:" you shall not leave white > > > > > > > > > > > > spaces. This is a must not to touch in the regex > > > > > > > > > > > > currently being used to match that > > > > > > > > > > > > > Other idea, would be to bring this power to markmin > > > > > > > > > > > > links... > > > > > > > > > > > > > Leave comments, > > > > > > > > > > > > Best regards > > > > > > > > > > > > > Francisco Gama Tabanez Ribeiro > > > > > > > > > > > > > E-mail: blacktho...@ironik.org > > > > > > > > > > > > Twitter: blackthorne