Hi!
In my Ecom webshop I want all users to be able to see the products, but only logged in users should see the prices. When using the extranet module, do you need to restrict access to a certain page to use the module, or can you just create a page with a paragraph with the Extranet module attached and in that paragraph use the DwExtranet tags?
I got an error showing that a dangerous value had been submitted when I did this way.
Best regards,
P
Developer forum
E-mail notifications
DwExtranet Action
Per Ljung
Posted on 17/05/2011 10:09:14
Replies
Nicolai Høeg Pedersen
Posted on 17/05/2011 10:18:12
You do not need to do anything but this in your product list and detail template:
<!--@If Defined(Global:Extranet.UserName)--> <!--@Ecom:Product.Price--> <!--@EndIf(Global:Extranet.UserName)-->
Per Ljung
Posted on 18/05/2011 08:05:05
You do not need to do anything but this in your product list and detail template:Ok, thanks. But my real problem is that I wonder if there's possible to create a login form without having to restrict access to a page?
123<!--@If Defined(Global:Extranet.UserName)-->
<!--@Ecom:Product.Price-->
<!--@EndIf(Global:Extranet.UserName)-->
Per Ljung
Posted on 18/05/2011 08:07:59
You do not need to do anything but this in your product list and detail template:And another question from another thread is that how you implement the logic above using xslt?
123<!--@If Defined(Global:Extranet.UserName)-->
<!--@Ecom:Product.Price-->
<!--@EndIf(Global:Extranet.UserName)-->
Best regards,
P
Rune Skovbo
Posted on 18/05/2011 08:26:14
Hi there
It is indeed possible to create a simple loginform without restricting access to a page.
It can be done like this:
<!--@If Not Defined(Global:Extranet.UserName)-->
<!--@Include(../../Extranet/LoginForm.html)-->
<!--@EndIf(Global:Extranet.UserName)-->
<!--@If Defined(Global:Extranet.UserName)-->
Content
<!--@EndIf(Global:Extranet.UserName)-->
Or this:
<!--@If Not Defined(Global:Extranet.UserName)-->
<form name="ExtUserForm" method="post" Action="" onSubmit="return checkform();">
Brugernavn<br /><input type="Text" name="Username" value="">
<br />
Kodeord<br /><input type="Password" name="Password" value="">
<br />
<input type="submit" value="login" class="button">
</form>
<!--@EndIf(Global:Extranet.UserName)-->
BUT, in order to make some things work, like errormessages and the option to get the password sent to you, you do however need to restrict access to a page.
BTW Nicolai, is there some technical reasons why "a full login form" is not possible on paragraph level?
/Rune
It is indeed possible to create a simple loginform without restricting access to a page.
It can be done like this:
<!--@If Not Defined(Global:Extranet.UserName)-->
<!--@Include(../../Extranet/LoginForm.html)-->
<!--@EndIf(Global:Extranet.UserName)-->
<!--@If Defined(Global:Extranet.UserName)-->
Content
<!--@EndIf(Global:Extranet.UserName)-->
Or this:
<!--@If Not Defined(Global:Extranet.UserName)-->
<form name="ExtUserForm" method="post" Action="" onSubmit="return checkform();">
Brugernavn<br /><input type="Text" name="Username" value="">
<br />
Kodeord<br /><input type="Password" name="Password" value="">
<br />
<input type="submit" value="login" class="button">
</form>
<!--@EndIf(Global:Extranet.UserName)-->
BUT, in order to make some things work, like errormessages and the option to get the password sent to you, you do however need to restrict access to a page.
BTW Nicolai, is there some technical reasons why "a full login form" is not possible on paragraph level?
/Rune
Nicolai Høeg Pedersen
Posted on 18/05/2011 08:41:41
Hi Rune.
No - not a good reason any ways.
It is already in the plans to "free" the login from a protected or specific page so anything you can do with login in the login template can be done globally from any template.
It will be released with 8.0
No - not a good reason any ways.
It is already in the plans to "free" the login from a protected or specific page so anything you can do with login in the login template can be done globally from any template.
It will be released with 8.0
Per Ljung
Posted on 18/05/2011 08:49:06
Hi thereOkay. Well the the reason that I want to create a standalone loginform is because when I restrict access to a page the menu is gone too. I want to restrict access to a page + showing the xslt menu in that page. Is this possible?
It is indeed possible to create a simple loginform without restricting access to a page.
It can be done like this:
<!--@If Not Defined(Global:Extranet.UserName)-->
<!--@Include(../../Extranet/LoginForm.html)-->
<!--@EndIf(Global:Extranet.UserName)-->
<!--@If Defined(Global:Extranet.UserName)-->
Content
<!--@EndIf(Global:Extranet.UserName)-->
Or this:
<!--@If Not Defined(Global:Extranet.UserName)-->
<form name="ExtUserForm" method="post" Action="" onSubmit="return checkform();">
Brugernavn<br /><input type="Text" name="Username" value="">
<br />
Kodeord<br /><input type="Password" name="Password" value="">
<br />
<input type="submit" value="login" class="button">
</form>
<!--@EndIf(Global:Extranet.UserName)-->
BUT, in order to make some things work, like errormessages and the option to get the password sent to you, you do however need to restrict access to a page.
BTW Nicolai, is there some technical reasons why "a full login form" is not possible on paragraph level?
/Rune
Best regards,
P
Rune Skovbo
Posted on 18/05/2011 09:41:44
Can't you put your logo, navigation, footer and all thats not directly editable on your master template? That should solve it.
/Rune
/Rune
Nicolai Høeg Pedersen
Posted on 18/05/2011 10:06:47
Hi Per
When restricting access to a page you can decide if the navigation item should be shown in menu or not:
http://manual.dynamicweb-cms.com/Dynamicweb-On-line-Manual/Modules/Users/Page,-module-and-paragraph-permissions.aspx
set the "Show this page in menu" to "For all users". Then the navigation item will be shown, but when clicked it prompts for username and password.
When restricting access to a page you can decide if the navigation item should be shown in menu or not:
http://manual.dynamicweb-cms.com/Dynamicweb-On-line-Manual/Modules/Users/Page,-module-and-paragraph-permissions.aspx
set the "Show this page in menu" to "For all users". Then the navigation item will be shown, but when clicked it prompts for username and password.
Per Ljung
Posted on 18/05/2011 10:46:21
Yes, it works, thanks. Actually the menu doesn't not consist of the pages, but the Ecom product groups.
Best regards,
Per
You must be logged in to post in the forum