ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Problem with "non-template" files?

May 03, 2013 5:43am

Subscribe [1]
  • #1 / May 03, 2013 5:43am

    ReGGaeBOSS

    1 posts

    Hi

    Im new to EE and i have a problem, and that is that the files that i keep outside the template folder (I have them in the EE folder root) wont apply, EXCEPT when i open up the site. If i navigate to one of the other pages it isnt working, same if i go back to the startpage.

    example:

    this one is working as it is a template:

    <link rel="stylesheet" type="text/css" href="{stylesheet='styles/responsive'}"/>

    but if I do it this way and place the css file in the EE folder root:

    <link rel="stylesheet" type="text/css" href="responsive.css"/>

    it doesnt work… except when first opening up the page as mentioned above.

    Can anyone tell me what I am doing wrong?

    (using EE locally btw)

     

     

  • #2 / May 03, 2013 9:03am

    Use an absolute path:

    <link rel="stylesheet" type="text/css" href="{path='site_index'}responsive.css"/>

    or if that won’t work (because your site url is configured wrong)
    http://ellislab.com/expressionengine/user-guide/cp/admin/general_configuration.html

    try

    <link rel="stylesheet" type="text/css" href="http://localhost/responsive.css"/>

    For more info read about “Absolute and Relative Paths in html”

  • #3 / May 03, 2013 12:09pm

    ReGGaeBOSS

    1 posts

    Use an absolute path:

    <link rel="stylesheet" type="text/css" href="{path='site_index'}responsive.css"/>

    or if that won’t work (because your site url is configured wrong)
    http://ellislab.com/expressionengine/user-guide/cp/admin/general_configuration.html

    try

    <link rel="stylesheet" type="text/css" href="http://localhost/responsive.css"/>

    For more info read about “Absolute and Relative Paths in html”

    the first one didnt work, but the second did. I cant see anything wrong with my site url ( if what u mean with that is the root directory?).... which is http://localhost/PROJECTS/EE/

    Any guesses why the first one didnt work?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases