maxhugen
Posts: 272
|
| Posted: 08/13/2008, 3:35 PM |
|
I've used the Menu Builder to create a database menu in an Include Page. This Include Page therefore has a link to the menu stylesheets, eg:
<link href="{page:pathToRoot}Styles/adx.css" type="text/css" rel="stylesheet">
As the Include Page is within the <body>, these links are within the <body> as well - which causes the page to fail HTML validation (tested via http://validator.w3.org).
Anyone have a way around this?
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |
maxhugen
Posts: 272
|
| Posted: 08/15/2008, 5:54 PM |
|
I don't think there's going to be an easy answer to this one!
CCS Support advise:
Quote :In fact the styles are applied just fine even though the reference is located inside the body. But as this approach is considered invalid I will submit this issue to our developer team for correction.
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |
Joachim Uersfeld
|
| Posted: 08/16/2008, 5:46 AM |
|
Remove
<link href="{page:pathToRoot}Styles/adx.css" type="text/css"
rel="stylesheet">
from the include page.
Joachim
|
|
|
 |
maxhugen
Posts: 272
|
| Posted: 08/16/2008, 5:51 PM |
|
Hi Joachim
That won't help, unfortunately, as every time the include page is uploaded to the server it's regenerated, and ccs adds the link again.
I had tried manually adding the stylesheet links to the main pages, and deleting them from the include page, but it wasn't a workable solution.
For now at least, I've changed to using a CSS menu from http://sperling.com/examples/navtop/, so it can be properly encapsulated in an include page.
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |
wkempees
Posts: 1679
|
| Posted: 08/17/2008, 4:47 PM |
|
Max,
In fact you did the right thing by reporting this to support directly.
As you may have noticed, parts of the html (in HTML view) of an included page is removed at publishing time, it is needed at design time to help us all view the page.
Therefore I interpret the support response as such that they will strip this 'invalid' code out as well.
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
|
 |
 |
maxhugen
Posts: 272
|
| Posted: 08/17/2008, 8:19 PM |
|
Hi Walter
They may have to do more than just strip them out, as the javascript and stylesheets are required for the menu presentation.
Maybe they need to add template php code - maybe in their internal Initialize() event - to set a {snippet} in the 'main' doc's header, with the js and css files ... dunno!
How do you handle menus in your apps?
Cheers, Max
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |
n0000spam
Posts: 15
|
| Posted: 01/10/2009, 1:43 AM |
|
Still there is no desigin ?!
|
 |
 |
damian
Posts: 838
|
| Posted: 01/10/2009, 1:49 AM |
|
the fact that it fails html validation doesnt impact the display of the page does it?
i would suggest that at this time it is a "known limitation" of the products output...
_________________
if you found this post useful take the time to help someone else.... :)
|
 |
 |
n0000spam
Posts: 15
|
| Posted: 01/10/2009, 10:03 PM |
|
There is one more trouble - after any changes on the incudalbe page with menu ССЫ add javascript code :
<script language="JavaScript" type="text/javascript">
//Begin CCS script
//Include Common JSFunctions @1-A2F3288E
</script>
<script language="JavaScript" src="{page:pathToRoot}ClientI18N.php?file=Functions.js&locale={res:CCS_LocaleID}" type="text/javascript" charset="utf-8"></script>
<script language="JavaScript" type="text/javascript">
//End Include Common JSFunctions
The same code placed on all non-includable pages. Therefore script ClientI18N.php?file=Functions.js is loading by browser every time twice.
|
 |
 |
maxhugen
Posts: 272
|
| Posted: 01/11/2009, 4:54 PM |
|
Quote :Therefore script ClientI18N.php?file=Functions.js is loading by browser every time twice.
I don't think that is correct... for example, if you use an image in several places in a webpage, the browser will only fetch it once. I think that would also apply to the CCS Functions.js file.
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |
n0000spam
Posts: 15
|
| Posted: 01/12/2009, 7:35 PM |
|
For a sample :
[11/Jan/2009:10:58:07 +0200] "GET /ClientI18N.php?file=Functions.js&locale=en HTTP/1.1" 200 27983
[11/Jan/2009:10:58:09 +0200] "GET /ClientI18N.php?file=Functions.js&locale=en HTTP/1.1" 200 27983
Browser twice loaded script.
|
 |
 |
maxhugen
Posts: 272
|
| Posted: 01/14/2009, 1:56 PM |
|
I tested this in FireBug, and yes, as you say, the browser does fetch this twice. (I use Firefox)
Then I tried adding the following multiple times just to test:
<script language="JavaScript" src="/js/pt/prototype.js" type="text/javascript"></script>
This was only fetched once!
Maybe it has something to do with the fact that we're fetching a php page with parameters (/ClientI18N.php?file=Functions.js...) ... I don't know.
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |