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.

linking to stylesheet and editing in dreamweaver

January 11, 2008 3:11am

Subscribe [7]
  • #1 / Jan 11, 2008 3:11am

    celeritycat

    19 posts

    OK so I have my templates saved as text files and I just started to use dreamweaver to edit my templates, that works great. But when save the templates as text files or rather php, dreamweaver does not know how to handle the link to weblogcss.php and you cant edit it like normal css. Can you name the weblog or site style sheet with .css appended to the end and just link to that? This is in top of my templates and I am confused.

    {assign_variable:master_weblog_name="myname"}
    {assign_variable:template_group_name="myname"}
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xml="http://www.w3.org/1999/xhtml">
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <LINK REL="Shortcut Icon" HREF="/images/tvp.ico" />
    <title>{exp:weblog:weblog_name weblog="{master_weblog_name}"}</title>
    <link rel=' type='text/css' media='all' href='weblog.css' />
    <style type='text/css' media='screen'>
    @import "{stylesheet={template_group_name}/weblog}";
    </style>
    <link rel="alternate" type="application/rss+xml" title="RSS" href="{path={template_group_name}/rss_2.0}" />
    <link rel="alternate" type="application/atom+xml" title="Atom" href="{path={template_group_name}/rss_atom}" />

    Do i keep this

    <link rel=' type='text/css' media='all' href='{stylesheet={template_group_name}/weblog}' />

    or do I link as above? should it be relative links or document?
    Please foregive my ignorance, I have never saved the templates as files before and I am kind of use to a virtual method rather than physical.

  • #2 / Jan 11, 2008 6:43am

    Sue Crocker

    26054 posts

    celeritycat, you can continue to use external .css files, you just need to path to them correctly.

    <link rel=' type='text/css' media='all' href='weblog.css' />

    Should actually be:

    <link rel=' type='text/css' media='all' href='/weblog.css' />

    Where / means path from the root.

    I put my CSS and JS files in a directory called… jscss. So my path would be:

    <link rel=' type='text/css' media='all' href='/jscss/weblog.css' />

    Make sense?

  • #3 / Jun 05, 2008 11:44am

    scottystang

    106 posts

    I ran into the same issue where I wanted to use Dreamweaver to edit my CSS, but saving the template as CSS stores the file as a .php extension so Dreamweaver treats the file as PHP and not CSS.  I’m treating my Javascript file the same way, but everything else is in EE.

    Is there a significant advantage of storing the CSS file as an EE template?  Maybe once my project is done, I’ll add the finished CSS back into EE.  But for now, the color coding and intellisense of Dreamweaver is too good to pass up for rapid development.

  • #4 / Jun 05, 2008 11:53am

    Andy Harris

    958 posts

    All of my CSS is handled outside of EE for just this reason, haven’t spotted a disadvantage yet.

  • #5 / Jun 21, 2009 3:42pm

    vacquah

    355 posts

    All of my CSS is handled outside of EE for just this reason, haven’t spotted a disadvantage yet.

    And how exactly do you do it? I just set up my install to use Espresso, saved all my templates as files, downloaded them to a local directory, and sure enough, all my css files are now php files . can someone give me an idiot proof methodology of handling css file edits outside of the CP, including the ability to update via ftp?

    Thx ...

  • #6 / Jun 21, 2009 3:58pm

    pab514

    181 posts

    You can create the folder manually and put it in the root of your site.
    then create your css and you should be ready to go. no need to create them or save them in EE templates.

  • #7 / Jun 21, 2009 9:11pm

    grrramps

    2219 posts

    FWIW, I use CSSEdit (which I totally love to use; made by the same folks who do Espresso, which I don’t) for CSS, but keep most CSS files in the EE templates (good for versioning cache updating). CSSEdit’s ‘live preview’ is to die for. Coda is also good for CSS, though not as elegant as CSSEdit.

  • #8 / Jun 22, 2009 12:40am

    vacquah

    355 posts

    FWIW, I use CSSEdit (which I totally love to use; made by the same folks who do Espresso, which I don’t) for CSS, but keep most CSS files in the EE templates (good for versioning cache updating). CSSEdit’s ‘live preview’ is to die for. Coda is also good for CSS, though not as elegant as CSSEdit.

    So you are using CSSEdit to edit the css files in php mode? Also CSSEdit has built versioning system - is there any downside with using that? thx…

  • #9 / Jun 22, 2009 1:28am

    grrramps

    2219 posts

    [
    So you are using CSSEdit to edit the css files in php mode?

    Nope. No need. It’s just a CSS file. The advantage of CSSEdit is that it’s a very good editor with an excellent live preview function.

    Also CSSEdit has built versioning system - is there any downside with using that?

    By using CSSEdit for basic set up and tweaking, then a quick copy/paste into EE, EE’s templates become the versioning system.

  • #10 / Jun 22, 2009 1:38am

    vacquah

    355 posts

    Thanks for the reply - what is the downside of doing it the way it is suggested above? i.e putting all the css files in a root folder and changing the paths in the index files to point to it - then you can use CSSEdit. It seems to be a fix for saving the css files as php files ...

  • #11 / Jun 22, 2009 2:12am

    grrramps

    2219 posts

    Thanks for the reply - what is the downside of doing it the way it is suggested above? i.e putting all the css files in a root folder and changing the paths in the index files to point to it - then you can use CSSEdit. It seems to be a fix for saving the css files as php files ...

    No downside that I can see. It would seem to me that a CSS as PHP file would have a little more overhead than a static CSS file. It’s really more an issue of whatever works best for you.

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

ExpressionEngine News!

#eecms, #events, #releases