I'm *not *sure but I think routes just "changes" on the fly the various
request.* pieces, so - again, *not *sure - using '/' + request.application
+ '/' should work ok.
On Thursday, February 28, 2013 5:30:53 PM UTC+1, RHC wrote:
>
> If I use {{=URL(request.application)}} in the view I get
>
> "/Test/default/Test"
>
> It has added on the current application and controller path.
>
> I would like to get just "/Test/" or, if I have used routes.py to set the
> default application to Test, maybe just "/". This is why I am trying to use
> the URL helper rather than just generate the string using
> request.application on it's own.
>
> On Wednesday, 27 February 2013 21:32:48 UTC, Niphlod wrote:
>>
>> ehm ... request.application !
>>
>> On Wednesday, February 27, 2013 10:26:51 PM UTC+1, RHC wrote:
>>>
>>> I'm trying to use javascript to automatically insert a link to a plugin
>>> web page within an application. However, the javascript, being a static
>>> file, has no way of generating a valid URL in the proper web2py fashion
>>> using a URL helper.
>>>
>>> I thought perhaps I could use the base element to re-define the root of
>>> the application using the URL helper. Then my javascript could then just
>>> insert a link to /plugin_myplugin/index.html for example.
>>>
>>> For example in the layout.html I was hoping to use
>>>
>>> <base href="{{=URL(...)}"/>
>>>
>>> Hoiwever, I am stuck for a way to get the URL helper just to create a
>>> url path to the application itself. e.g. /myapp/
>>>
>>> I want to use the URL helper so that if I start customising the
>>> routes.py then the generated url will still be valid.
>>>
>>> Any ideas? Is this even possible, if not is there another way to
>>> approach this?
>>>
>>> Thanks,
>>>
>>> Richard.
>>>
>>
--
---
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.