On Feb 15, 2011, at 11:16 AM, Massimo Di Pierro wrote:
> 
> Not sure if that should be
> 
> <base href="{{=URL(request.application,'static','plugin_layouts/
> layouts/Optimism/')}}" />
> 
> or it should be removed completely. Please try it.

<base> is supposed to be an absolute URL; I'm not sure if the output of URL() 
qualifies, since it doesn't include a scheme and domain. Maybe....

Also, a <base> href is suppose to point to the current document.

> 
> 
> On Feb 15, 10:57 am, stargate <[email protected]> wrote:
>> The broken images started when i created a new application and applied
>> the following layout plugin to it
>> 
>> http://www.web2py.com/layouts/static/plugin_layouts/layouts/Pluralism...
>> 
>> The problem is when you see the preview all the images are intact but
>> when i try to do it all the images are broken not to sure why
>> 
>> On Feb 15, 11:33 am, stargate <[email protected]> wrote:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> This line generates a error
>> 
>>> <base href="{{(URL(request.application,'static','plugin_layouts/
>>> layouts/Optimism/')}}" />
>> 
>>> Not sure why
>> 
>>> On Feb 15, 9:40 am, villas <[email protected]> wrote:
>> 
>>>> 'base' is for when all links on that page are to the same place.  You
>>>> have to decide that.
>> 
>>>> However,  I don't think 'response.files' is right for that. Maybe this
>>>> would be better...
>>>> <base href="{{(URL(request.application,'static','plugin_layouts/
>>>> layouts/Optimism/')}}" />
>> 
>>>> -D
>> 
>>>> On Feb 15, 1:28 pm, stargate <[email protected]> wrote:
>> 
>>>>> Wouldn't it also better to use
>> 
>>>>> <base
>>>>> href="{{response.files.append(URL(request.application,'static','plugin_layo
>>>>>  uts/
>>>>> layouts/Optimism/'))}} " />
>> 
>>>>> This would cut time for inserting the code in every image tag on the
>>>>> page.  Please correct me if i am wrong.
>> 
>>>>> On Feb 15, 1:04 am, villas <[email protected]> wrote:
>> 
>>>>>>> Why would you have another folder called layouts.
>> 
>>>>>> I only copied what was in the other post to demonstrate a different
>>>>>> (more recent) syntax.
>> 
>>>>>> If you look in the views/layout.html file you will see how the
>>>>>> other .js files are included,
>>>>>> e.g. {{response.files.append(URL('static','js/superfish.js'))}}
>> 
>>>>>> It is best if you examine your own paths,  then you will see where
>>>>>> your files are located and be able to learn to link to them
>>>>>> accordingly.  Do you have this file? :  static/plugin_layout/Optimism/
>>>>>> js/cufon-yui.js
>>>>>> If so, then what you have should be OK.
>> 
>>>>>> I think this would be more recommended:
>>>>>> {{response.files.append(URL('static','plugin_layout/Optimism/js/cufon-
>>>>>> yui.js'))}}
>> 
>>>>>> If you have Firefox browser,  experiment with the Firebug plug-in.
>>>>>> You can see exactly what is being found and included in your pages. It
>>>>>> is a good, worthwhile tool.
>> 
>>>>>> -D
>> 
>>>>>> On Feb 15, 3:21 am, stargate <[email protected]> wrote:
>> 
>>>>>>> I am trying to figure out a proper structure.  Right now i have it
>>>>>>> like this.
>> 
>>>>>>> ../<appname>/static/plugin_layouts/Optimism/images/img17.jpg
>> 
>>>>>>> Why would you have another folder called layouts.
>> 
>>>>>>> Also i am including my scripts like this
>> 
>>>>>>>  <script src="{{=URL('static','plugin_layout/Optimism/js/cufon-
>>>>>>> yui.js')}}"></script>
>> 
>>>>>>> Is that correct
>> 
>>>>>>> On Feb 14, 8:38 pm, villas <[email protected]> wrote:
>> 
>>>>>>>>> <img src="{{=URL(r=request, c='static', f='plugin_layouts/layouts/
>>>>>>>>> Optimism/images/img17.jpg')}}" alt="" width="90" height="90" />
>> 
>>>>>>>> You could also try this format (available in more recent versions of
>>>>>>>> web2py):
>> 
>>>>>>>> {{=IMG(_src=URL('static','plugin_layouts',args=('layouts','optimism','image
>>>>>>>>  s','img17.jpg')),_alt='pic',_width='90',_height='90')}}


Reply via email to