Tags:
create new tag
view all tags

Question

I have noticed that some core plugins (and the core) use PUBURL to render the link to some javascripts and css files.

The difference between is that PUBURL renders the whole URL while PUBURLPATH only renders the query path (URl without server or protocol).

Given that PUBURL is not "rewrite-friendly" (fact that I found the hard wayt), in which cases it should be preferred over PUBURLPATH?

Environment

TWiki version: TWikiRelease04x02x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Documentation

-- RafaelAlvarez - 21 Apr 2008

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

Whenever you are preparing text which is not controlled by a browser (which respects a <base href="..."/>), a %PUBURL% is necessary, e.g. when creating printable documents or mails. In all other cases, including CSS and JavaScript, %PUBURLPATH% should be more appropriate.

-- HaraldJoerg - 21 Apr 2008

Change status to:
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2008-04-21 - HaraldJoerg
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.