[daisy] Login page issue
Scott Warren
scottwarren at ocom.com.au
Tue Nov 14 16:14:00 CST 2006
I created a Login page by overwriting the template layout.xsl in the Skin
I added this template
<xsl:template name="guestlayout">
<body>
<style type="text/css">
<!--
.style1 {
}
.style4 {
;
}
.style5 {
}
.style7 {color: #FFFFFF}
-->
</style>
<script>
daisyPushOnLoad(function() {
document.getElementById("username").select();
document.getElementById("username").focus();
});
</script>
<table width="100%" height="97%" border="0" cellpadding="2">
<tr>
<td height="200px">
<div style="background-image:
url('{$mountPoint}/resources/skins/skin/images/TopLeft.png'); width:100%;
height:200px;"/>
</td>
<td width="300px" height="200px">
<div
style="background-image:url('{$mountPoint}/resources/skins/skin/images/TopRi
ght.png'); background-repeat: repeat; height: 200px; width: 300px;" >
<div
style="position:relative; font-family: Verdana, Arial,
Helvetica, sans-serif; font-weight: bold; font-size: 12px; color: #FFFFFF;
top:175px; width:100%"
align="center"> Need Help? Call 1800 ### ###
</div>
</div>
</td>
</tr>
<tr>
<td height="124">
<img src="{$mountPoint}/resources/skins/skin/images/Library.png"
width="100%"
height="140" />
</td>
<td bgcolor="#9D9DFF" width="300px" style="padding: 2px;
padding-right:2px; border: 2px solid white;">
<form method="POST"
action="/daisy/login?returnTo=%2Fdaisy%2Fskin%2F2.html">
<p align="center" style="font-family: Verdana, Arial,
Helvetica, sans-serif; font-size: 12px; color:white; font-weight:bold; ">
Please enter your Log In details here </p>
<table>
<tr>
<td>
<div align="right">
<span style="font-family: Verdana, Arial, Helvetica,
sans-serif; font-weight: bold; font-size: 12px;">User Name </span>
</div>
</td>
<td>
<input style="width: 140px" value="guest" type="text"
id="username"
name="username" />
</td>
</tr>
<tr>
<td>
<div align="right">
<span style="font-family: Verdana, Arial, Helvetica,
sans-serif; font-weight: bold; font-size: 12px;">Password</span>
</div>
</td>
<td>
<input style="width: 140px" type="password"
name="password" />
</td>
</tr>
<tr>
<td> </td>
<td>
<input name="submit" type="submit" value="Login" />
</td>
</tr>
</table>
<input value="login" name="action" type="hidden" />
</form>
</td>
</tr>
<tr>
<td height="200px">
<div style="background-image:
url('{$mountPoint}/resources/skins/skin/images/BottomLeft.png'); width:100%;
height:200px;"/>
</td>
<td width="300px" align="center" valign="top">
<div
style="background-image:url('{$mountPoint}/resources/skins/skin/images/Botto
mRight.png'); background-repeat: repeat; height: 200px; width: 300px;" >
<div
style="position:relative; font-family: Verdana, Arial,
Helvetica, sans-serif; font-weight: bold; font-size: 12px; color: #FFFFFF;
top:5px; width:100%"
align="center"><a href="/daisy/passwordReminder">Forgotten
your password? Click Here <p />
<img
src="{$mountPoint}/resources/skins/skin/images/lock.png" border="0" />
</a>
</div>
</div>
</td>
</tr>
</table>
</body>
Then in template match="page" I added this
<xsl:choose>
<xsl:when test="$user/id=101 and availableVariants">
<xsl:call-template name="guestlayout" />
</xsl:when>
<xsl:when test="$layoutType = 'plain'">
<xsl:call-template name="plainLayout" />
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="defaultLayout" />
</xsl:otherwise>
</xsl:choose>
If the user is 101 (ie Guest) then it displays the login page.
Hope this helps.
Regards
Scott Warren
Ocom Software
... Exceeding Quality.....
web | ocom.com.au
> -----Original Message-----
> From: daisy-bounces at lists.cocoondev.org [mailto:daisy-
> bounces at lists.cocoondev.org] On Behalf Of Yassine ELassad (YEL)
> Sent: Wednesday, 15 November 2006 8:47 AM
> To: Daisy: open source CMS - general mailinglist
> Subject: [daisy] Login page issue
>
> Hi everyone,
> i would like to know, if its possible to define a login page( skin )
> for each daisy wiki instance?
> If yes i would be glad if someone of you guys can points me to the
> docs that gives an overview on how such task should be achieved.
>
> greetings
> TIA
> yassine
> --
> (e==mc²)?
> _______________________________________________
> daisy community mailing list
> Professional Daisy support:
> http://outerthought.org/site/services/daisy/daisysupport.html
> mail to: daisy at lists.cocoondev.org
> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
More information about the daisy
mailing list