PostNuke: A Flexible Open Source Content Management System
home | forum | international support | contact us

Support Forum

Start ::  Developers Corner ::  0.8 Theme Design ::  Stylesheet absolute path

Moderated by: Support Team

Bottom
Stylesheet absolute path

  • Link to this postingPosted: 08.03.2007, 09:57
    Profile
    ntward
    rank:
    pnFreshman pnFreshman
    registered:
     January 2007
    Status:
    offline
    last visit:
    25.04.07
    Posts:
    27
    How do I get the absolute path of a stylesheet?

    Code
    <!--[$stylepath]-->

    ...doesn't give the URL of the site, and it cant be combined with:
    Code
    <!--[pngetbaseurl]-->

    ...because it results in something like:
    http://www.mysite.co.uk/P...yTheme/style/style.css

    Thanks all




    edited by: ntward, Mar 08, 2007 - 10:01 AM
  • Link to this postingPosted: 08.03.2007, 11:08
    Profile Homepage
    kaffeeringe.de
    rank:
    pnProfessional pnProfessional
    registered:
     September 2002
    Status:
    offline
    last visit:
    11.05.08
    Posts:
    745
    For what do you need that? $stylepath is usually sufficient.

    -----
    best regards from Kiel, sailing city

    Steffen Voß

    Member of the PostNuke Steering Committee
    Visit: Kaffeeringe.de - Internet & Kreativität
  • Link to this postingPosted: 08.03.2007, 11:08
    Profile Homepage
    markwest
    rank:
    Moderator Moderator
    registered:
     March 2002
    Status:
    offline
    last visit:
    24.04.08
    Posts:
    7647
    The Stylepath, and other theme paths, use the base URI rather than base URL. Within the theme module I can't really see the need for using the URL rather than the URI.

    -Mark
  • Link to this postingPosted: 08.03.2007, 11:47
    Profile Homepage
    Landseer
    rank:
    Steering Committee Steering Committee
    registered:
     January 2003
    Status:
    offline
    last visit:
    25.04.08
    Posts:
    802
    The modulestylesheet plugin creates complete urls for stylesheets.




    -----
    "He is not dangerous, he just wants to play...."
  • Link to this postingPosted: 08.03.2007, 12:08
    Profile Homepage
    markwest
    rank:
    Moderator Moderator
    registered:
     March 2002
    Status:
    offline
    last visit:
    24.04.08
    Posts:
    7647
    Frank,
    Looking at my current SVN install that doesn't seem to be the case. In the admin panel page I have
    Code
    <link rel="stylesheet" href="/PostNuke_SVN/trunk/PostNuke/themes/andreas08/style/style.css" type="text/css" media="screen,projection" />
    <link rel="stylesheet" href="/PostNuke_SVN/trunk/PostNuke/system/Admin/pnstyle/navtabs.css" type="text/css" />
    <link rel="stylesheet" href="/PostNuke_SVN/trunk/PostNuke/system/Admin/pnstyle/admin.css" type="text/css" />

    All use the URI rather than the URL.
    -Mark
  • Link to this postingPosted: 08.03.2007, 12:25
    Profile Homepage
    Landseer
    rank:
    Steering Committee Steering Committee
    registered:
     January 2003
    Status:
    offline
    last visit:
    25.04.08
    Posts:
    802
    Right, I mixed URI with URL. Mea culpa.

    I need a day off....





    -----
    "He is not dangerous, he just wants to play...."
  • Link to this postingPosted: 08.03.2007, 15:04
    Profile
    ntward
    rank:
    pnFreshman pnFreshman
    registered:
     January 2007
    Status:
    offline
    last visit:
    25.04.07
    Posts:
    27
    Hi all,
    I need it for my site-wide RSS feed module. The XSL stylesheet loads a CSS style sheet, and for some reason I need to have the complete path included for it to work. The relative path fails.

    Ideally I don't want to hard code it, so I can easily use it on several sites. Also, I need use a stylesheet from the theme rather than the module for consistency.

    What am I missing?
  • Link to this postingPosted: 08.03.2007, 16:00
    Profile Homepage
    markwest
    rank:
    Moderator Moderator
    registered:
     March 2002
    Status:
    offline
    last visit:
    24.04.08
    Posts:
    7647
    Nick,

    I take the point of the use of these variables in 'pages' to be served remotely. Should, at some point, we introduce stylesheets into our rss and atom themes we would run into the same problem. I've updated these paths to be URLs rather than URIs. This makes no difference to the browser and solve your problem.

    This will be in the next daily.

    -Mark
  • Link to this postingPosted: 08.03.2007, 16:17
    Profile
    ntward
    rank:
    pnFreshman pnFreshman
    registered:
     January 2007
    Status:
    offline
    last visit:
    25.04.07
    Posts:
    27
    Mark,
    Cheers!

Start ::  Developers Corner ::  0.8 Theme Design ::  Stylesheet absolute path

Main Menu

Extensions Database

Documentation

Development

Login





 


 Log in Problems?
 New User? Sign Up!

Donate to PostNuke