Hi, I am a very novice user and have been learning HTML and CSS through trial and error with this great CMF. I have been pulling pieces of information from all over the web and the great community here.
I found a reference where you can use:
<link href="[[~ID]]" rel="stylesheet" type="text/css" />
to reference a resource that contains the appropriate CSS stylesheet information on a CSS ONLY template. I found this to work nicely and allow me to adjust the css as I learn via the Manager >>SITE >>VIEW... which loads my homepage in a new window.
As I have become comfortable using chunks I started to take this same approach with my styleheets and ended up having the <head> with the following:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>[[*longtitle]]</title>
<title>[[++site_name]] - [[*pagetitle]]</title>
<base href="[[++site_url]]" />
<link href="[[~2]]" rel="stylesheet" type="text/css" />
<link href="[[~4]]" rel="stylesheet" type="text/css" />
<link href="[[~6]]" rel="stylesheet" type="text/css" />
<link href="[[~7]]" rel="stylesheet" type="text/css" />
<link href="[[~8]]" rel="stylesheet" type="text/css" />
</head>
In a chunk that I use in my template. Each resource is the same... CSS definitions on a CSS ONLY template. When I go to the Manager>>SITE>>VIEW, I see all my changes as each resource represents the key sections of my webpage.
My Problem is that the CSS does NOT load in the browser on its own, I have to log in the Manager then SITE>> VIEW and then the page will load properly then and all subsequent requests of that webpage IF I do not it will not load the CSS styling.
So... My only conclusion is that separating the CSS in such a way MUST be a very poor practice I was hoping for some feedback from the community to confirm this or to point out a mistake I am making in the coding. Perhaps shed some light on why the browser behaves in such a manner so I can further my understanding of the compiling of PHP.
The page source reflects:
<title>Shop Coop Network - Home</title>
<base href="http://www.shopcoop.org/" />
<link href="index.php?id=2" rel="stylesheet" type="text/css" />
<link href="index.php?id=4" rel="stylesheet" type="text/css" />
<link href="index.php?id=6" rel="stylesheet" type="text/css" />
<link href="index.php?id=7" rel="stylesheet" type="text/css" />
<link href="index.php?id=8" rel="stylesheet" type="text/css" />
WebSite:
http://www.shopcoop.org/
MODx Version: MODX Revolution 2.2.0-pl2 (traditional)
Database: mysql 5.0.92-community
PHP version: 5.2.17
OS: Linux server15.websitehostserver.net 2.6.18-374.12.1.el5.lve0.8.54 #1 SMP Wed Jan 4 18:40:17 EET 2012 x86_64
THANKS for your TIME!!!