Hi solprovider, hi all,
[EMAIL PROTECTED] a écrit :
[...]
The image in the Authoring section is at:
http://our_server.fr/lenya_directory/our_pub/authoring/universite/test/Souris.jpg
Test that URL in a browser with a "bad" login. Assuming my theory
below is correct, it should work.
Yes it works
You should have mentioned that JS was involved. The JS function is
not in the HEAD when in the Authoring section because Lenya wraps the
content page with the CMS GUI, so the JS is not loaded before the page
is loaded, so the document.writes never happen. That explains why no
red X displays in MSIE; all it sees is a SCRIPT tag calling an
unavailable function.
Oh sorry, i didn't know all those things :(
Try adding your img() function to:
\build\lenya\webapp\lenya\resources\menu\menu.js
It should work now.
It displays the code :
<div style="block:table-cell"><img src="test/Souris.jpg" width="410px"
border="0" height="462"/></div>
instead of the image ...
A better solution is for Lenya to combine the HEAD of the content with
the HEAD of the CMS GUI. This should happen in:
\build\lenya\webapp\lenya\xslt\menu\menu2xslt.xsl
I am afraid i don't really understand what i have to test. I put my
menu2xslt.xsl as attached file.
Do you mean i have something to add between :
<xso:template match="/">
<html>
<head>
<xso:call-template name="title"/>
<script src="{$contextprefix}/lenya/menu/menu.js"
type="text/javascript"> </script>
<link href="{$contextprefix}/lenya/css/menu.css" rel="stylesheet"
type="text/css"/>
<xso:apply-templates select="xhtml:html/xhtml:head/*[local-name() !=
'title']"/>
</head>
A quick read of Lenya 1.2.2's version suggests that if the content
contains a HEAD tag, the page will contain two HEAD tags. (I hope I
am wrong. I'll test tomorrow if you do not confirm it.)
Check the source of the page in the Authoring section. Does it have 2
HEAD tags? Where is the img() function?
I don't know if this help, but here is the head of the document
displayed in the authoring-tab :
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>
Apache Lenya |
univ_reunion |
authoring |
/universite/test.html |
Université de la Réunion</title>
<script src="/lenya_univ/lenya/menu/menu.js" type="text/javascript">Â </script>
<link href="/lenya_univ/lenya/css/menu.css" rel="stylesheet" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link href="/lenya_univ/univ_reunion/authoring/css/style.dynamic.css" type="text/css"
rel="stylesheet">
<script type="text/javascript"
src="/lenya_univ/univ_reunion/authoring/js/general.dynamic.js">Â </script>
</head>
The img() fonction is in
"/lenya_univ/univ_reunion/authoring/js/general.dynamic.js"
Now there is a img() in /lenya_univ/lenya/menu/menu.js too.
Kind regards, annie
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 1999-2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id: menu2xslt.xsl 149176 2005-01-30 22:54:09Z gregor $ -->
<xsl:stylesheet version="1.0"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xso="http://apache.org/cocoon/lenya/xslt/1.0"
>
<xsl:param name="contextprefix"/>
<xsl:param name="publicationid"/>
<xsl:param name="area"/>
<xsl:param name="documenturl"/>
<xsl:namespace-alias stylesheet-prefix="xso" result-prefix="xsl"/>
<xsl:template match="/">
<xso:stylesheet version="1.0"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="xhtml">
<xso:output method="xml" indent="yes"/>
<xsl:if test="$area != 'live'">
<xso:template match="/">
<html>
<head>
<xso:call-template name="title"/>
<script src="{$contextprefix}/lenya/menu/menu.js" type="text/javascript"> </script>
<link href="{$contextprefix}/lenya/css/menu.css" rel="stylesheet" type="text/css"/>
<xso:apply-templates select="xhtml:html/xhtml:head/*[local-name() != 'title']"/>
</head>
<body>
<xsl:apply-templates select="xhtml:[EMAIL PROTECTED] = 'lenya-menubar']"/>
<div id="lenya-cmsbody">
<xso:apply-templates select="xhtml:html/xhtml:body/node()"/>
</div>
<script type="text/javascript"> initialize(); </script>
</body>
</html>
</xso:template>
<xso:template name="title">
<title>
Apache Lenya |
<xsl:value-of select="$publicationid"/> |
<xsl:value-of select="$area"/> |
<xsl:value-of select="$documenturl"/> |
<xso:value-of select="xhtml:html/xhtml:head/xhtml:title"/>
</title>
</xso:template>
</xsl:if>
<xso:template match="xhtml:script">
<xso:copy>
<xso:apply-templates select="@*|node()"/>
<xso:if test="not(.//text())"><xso:text> </xso:text></xso:if>
</xso:copy>
</xso:template>
<xso:template match="xhtml:*">
<xso:element>
<xsl:attribute name="name">{local-name()}</xsl:attribute>
<xso:apply-templates select="@*|node()"/>
</xso:element>
</xso:template>
<xso:template match="@*|node()">
<xso:copy>
<xso:apply-templates select="@*|node()"/>
</xso:copy>
</xso:template>
</xso:stylesheet>
</xsl:template>
<xsl:template match="xhtml:*">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="@*|node()"/>
</xsl:element>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]