Jack_Walter
Posts: 39
|
| Posted: 09/11/2008, 4:46 AM |
|
Hi,
All my normal pages include a header page (in my case this includable page has the name "heading"). The header page uses the "School" style and is _not_ in the root directory, but in a subdirectory called "Includes".
The first three lines from this page:
<link rel="stylesheet" type="text/css" href="../Styles/School/Style_doctype.css">
<link href="{page:pathToRoot}Styles/adx.css" type="text/css" rel="stylesheet">
<link href="{page:pathToRoot}Styles/School/Menu.css" type="text/css" rel="stylesheet">
I've build a page (in the root dir) that exports data to excel via a button. As long as it has the line
<link href="Styles/School/Style_doctype.css" type="text/css" rel="stylesheet">
in it, everything is fine but I get an error message while importing to excel, that this stylesheet is missing.
Ok, the normal solution to get rid of this message is to delete this line in the html code of this page (which works fine) but after this my page has no style sheet any more and looks a bit ugly :)
The thing I don't understand: By including the heading page the normal page should get the stylesheet from it but obviously that's not the case.
Is it a problem that the heading pages resides in the subdirectory? If that's the case how can I fix it without giving up my existent directory structure (I'd like to keep the heading page in the Includes dir)?
Regards,
Jack
|
 |
 |
quasimidi
Posts: 151
|
| Posted: 09/11/2008, 4:52 AM |
|
Try to change your line from this:
<link href="Styles/School/Style_doctype.css" type="text/css" rel="stylesheet">
to this:
<link href="http://www.yoursite.com/Styles/School/Style_doctype.css" type="text/css" rel="stylesheet">
_________________
RS |
 |
 |
datadoit
|
| Posted: 09/11/2008, 4:56 AM |
|
Normally these link ref tags would reside in the master page, not the
includable pages.
Having includables in a subdirectory is not an issue, and encouraged.
|
|
|
 |
Jack_Walter
Posts: 39
|
| Posted: 09/11/2008, 5:10 AM |
|
<link href="http://www.yoursite.com/Styles/School/Style_doctype.css" type="text/css" rel="stylesheet">
I can't do this because this project will run on a normal windows pc in a larger network (and I won't know the netbios name of it) and every pc in that subnet that accesses such a page will fail to display any stylesheet at all :)
Quote :Normally these link ref tags would reside in the master page, not the includable pages.
Mh, is "the master page" something special? I didn't find anything in the documentation regarding "them". Or do you just mean that any normal page is a master in reference to their included pages (like the heading page in my case)?
Regards,
Jack
|
 |
 |
datadoit
|
| Posted: 09/11/2008, 9:10 AM |
|
> Or do you just mean that any normal page is a
> master in reference to their included pages (like the heading page in my case)?
>
Yes. :)
|
|
|
 |
Jack_Walter
Posts: 39
|
| Posted: 09/11/2008, 9:14 AM |
|
I wasn't able to resolve this issue...
So I moved the heading page from .\Includes back into the root dir, adapted all the links and now it's working fine (the master page get's the stylesheet from the heading page).
Seems that there are issues inside CC when I has to include pages from other directories *shrug*.
Regards,
Jack
|
 |
 |
wkempees
Posts: 1679
|
| Posted: 09/11/2008, 12:33 PM |
|
JW,
What version CCS?
An Include page is always supposed to 'inherit'from the page it is included in/on.
Imagine this, a grid that is includable.
Several pages all over the system, including that included grid.
It (the included grid) should be able to get it's select where parameters from any search on any of thos pages (master...)
So even the styles would have to be the master's.
If your included page would have had dynamic styles it would even use the set style per master.
DD, is right.
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
datadoit
|
| Posted: 09/11/2008, 12:34 PM |
|
Let's say you have a page called /index.php. In the <head> section you
have:
<link rel="stylesheet" type="text/css"
href="Styles/School/Style_doctype.css">
<link href="Styles/adx.css" type="text/css" rel="stylesheet">
<link href="Styles/School/Menu.css" type="text/css" rel="stylesheet">
Now let's say somewhere in your index.php page you have an include that
points to /includes/header.php. In your header.php file, omit any
reference to <head> or even <html> - it's not needed at all and becomes
redundant and doesn't play nicely with online validators.
Publish and all should be well. The {page:pathToRoot} attribute may be
screwing things up.
|
|
|
 |
Jack_Walter
Posts: 39
|
| Posted: 09/12/2008, 2:22 PM |
|
Thanks guys,
for the detailed informations! One more thing I've learned about CSS. Only 5000 more and I'm a professional ;)
Regards,
Jack
|
 |
 |
|