You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Sean Fulton <fu...@cmu.edu> on 2005/06/13 18:31:34 UTC

Login form

Does anyone have an example of how to add a login form to pages on a 
site? I've looked through login.xsl and I'm not gettig it. How can one 
reuse this to functionality on other pages?

Thanks,

	Sean



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Login form

Posted by Sean Fulton <fu...@cmu.edu>.
On 2005-06-13 17:54:52 -0400, <so...@gmail.com> said:

> On 6/13/05, Sean Fulton <fu...@cmu.edu> wrote:
>>>> Does anyone have an example of how to add a login form to pages on a
>>>> site? I've looked through login.xsl and I'm not getting it. How can on e
>>>> reuse this to functionality on other pages?
>> Thanks. Actually, I'm looking to put a login form on on (almost) every
>> page the same way you'd have a search form on every page.
> 
> Sorry.  I was confused by the mention of login.xsl.  You just want to
> add an HTML Form for the login:
> [Copied from the source Lenya generates for
> "?lenya.usecase=login&lenya.step=showscreen" with all formatting
> removed.]
> 
> <form method="get">
> <input value="login" name="lenya.usecase" type="hidden">
> <input value="login" name="lenya.step" type="hidden">
> Username:<input type="text" name="username"> Password:<input
> type="password" name="password" ><input value="Login" type="submit"
> </form>
> 
> You could create a login.xsl by copying search.xsl, modifying it, and
> using it as a navigation element.  It would be easier and faster just
> to add the HTML to your XSL.  If you need to make it maintainable from
> one place, put it into common.xsl:
> <xsl:template name="myLogin">HTML from above</xsl:template>
> 
> and use call-template in your page2xhtml-*.xsl's:
> <xsl:call-template name="myLogin"/>
> 
> BTW: The code in the previous post should have been
> "lenya.step=showscreen", not "lenya.step=login".
> 
> solprovider
> 
Thanks! Seems obvious now.

	Sean



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Login form

Posted by so...@gmail.com.
On 6/13/05, Sean Fulton <fu...@cmu.edu> wrote:
> >> Does anyone have an example of how to add a login form to pages on a
> >> site? I've looked through login.xsl and I'm not getting it. How can one
> >> reuse this to functionality on other pages?
> Thanks. Actually, I'm looking to put a login form on on (almost) every
> page the same way you'd have a search form on every page.

Sorry.  I was confused by the mention of login.xsl.  You just want to
add an HTML Form for the login:
[Copied from the source Lenya generates for
"?lenya.usecase=login&lenya.step=showscreen" with all formatting
removed.]

<form method="get">
<input value="login" name="lenya.usecase" type="hidden">
<input value="login" name="lenya.step" type="hidden">
Username:<input type="text" name="username"> Password:<input
type="password" name="password" ><input value="Login" type="submit">
</form>

You could create a login.xsl by copying search.xsl, modifying it, and
using it as a navigation element.  It would be easier and faster just
to add the HTML to your XSL.  If you need to make it maintainable from
one place, put it into common.xsl:
<xsl:template name="myLogin">HTML from above</xsl:template>

and use call-template in your page2xhtml-*.xsl's:
<xsl:call-template name="myLogin"/>

BTW: The code in the previous post should have been
"lenya.step=showscreen", not "lenya.step=login".

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Login form

Posted by Sean Fulton <fu...@cmu.edu>.
On 2005-06-13 13:22:39 -0400, <so...@gmail.com> said:

> On 6/13/05, Sean Fulton <fu...@cmu.edu> wrote:
>> Does anyone have an example of how to add a login form to pages on a
>> site? I've looked through login.xsl and I'm not getting it. How can one
>> reuse this to functionality on other pages?
> 
> For the global login, just add a link to the usecase:
> <A HREF="/index.html?lenya.usecase=login&amp;lenya.step=login"><i18n: 
> text>Login</i18n:text></A>
> 
> You probably need to create the path correctly, using {$url} or
> building it like:
> <A HREF="{$root}/index_{$language}.html?lenya.usecase=login&amp;lenya.s 
> tep=login"><i18n:text>Login</i18n:text></A>
> 
> I put it in common.xsl, which is imported by all page2xhtmls for the
> header and footers.
> 
> ---
> I'll put instructions for my rather complicated "Login/Registration"
> page on my site tonight.  It is a Usecase with 2 Flows.  It is
> probably overkill for most sites, but is a good demonstration of what
> is possible.
> 
> solprovider

Thanks. Actually, I'm looking to put a login form on on (almost) every 
page the same way you'd have a search form on every page.

	Sean



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Login form

Posted by so...@gmail.com.
On 6/13/05, Sean Fulton <fu...@cmu.edu> wrote:
> Does anyone have an example of how to add a login form to pages on a
> site? I've looked through login.xsl and I'm not getting it. How can one
> reuse this to functionality on other pages?

For the global login, just add a link to the usecase:
<A HREF="/index.html?lenya.usecase=login&amp;lenya.step=login"><i18n:text>Login</i18n:text></A>

You probably need to create the path correctly, using {$url} or
building it like:
<A HREF="{$root}/index_{$language}.html?lenya.usecase=login&amp;lenya.step=login"><i18n:text>Login</i18n:text></A>

I put it in common.xsl, which is imported by all page2xhtmls for the
header and footers.

---
I'll put instructions for my rather complicated "Login/Registration"
page on my site tonight.  It is a Usecase with 2 Flows.  It is
probably overkill for most sites, but is a good demonstration of what
is possible.

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


RE: Login form

Posted by Adam LIM <fu...@axidea.fr>.
You can check this following link:
http://wiki.apache.org/lenya/HowToCFormsInLenya
Follow the instructions. It's not that hard. Hope this will help you

-----Message d'origine-----
De : news [mailto:news@sea.gmane.org] De la part de Sean Fulton
Envoyé : lundi 13 juin 2005 18:32
À : user@lenya.apache.org
Objet : Login form

Does anyone have an example of how to add a login form to pages on a 
site? I've looked through login.xsl and I'm not gettig it. How can one 
reuse this to functionality on other pages?

Thanks,

	Sean



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org