Developer forum

Forum » Development » Extranet/intranet module

Extranet/intranet module


Reply

I am creating a new shop in Dynamic where the customer needs to log in to see price information. As I understand the extranet module all pages included in an extranet is protected by a log in page.

This is not exactly what is needed here. Everybody visiting the website is allowed to see product information; but to see prices and place an order, they need to have an extranet account and log in. So the extranet is showing "public" pages; but just allowing the user to view more information when they are logged in.

Any ideas or examples???


Replies

 
Nicolai Høeg Pedersen
Reply
karen wrote:

I am creating a new shop in Dynamic where the customer needs to log in to see price information. As I understand the extranet module all pages included in an extranet is protected by a log in page.

This is not exactly what is needed here. Everybody visiting the website is allowed to see product information; but to see prices and place an order, they need to have an extranet account and log in. So the extranet is showing "public" pages; but just allowing the user to view more information when they are logged in.

Any ideas or examples???


 

The simple way is to check if a user is logged in using If defined in templates. See example here:

http://template.dynamicweb.dk/TemplateTags/Dynamicweb-template-tags/General-tags/If/else-tags.aspx

This example would make it possible to hide prices and "buy" button for users not logged in.

 

If more advanced features are needed it might be a good idea to take a look at the extensibility API's. That would give you endless possibilities.

 
Reply
np wrote:
karen wrote:

I am creating a new shop in Dynamic where the customer needs to log in to see price information. As I understand the extranet module all pages included in an extranet is protected by a log in page.

This is not exactly what is needed here. Everybody visiting the website is allowed to see product information; but to see prices and place an order, they need to have an extranet account and log in. So the extranet is showing "public" pages; but just allowing the user to view more information when they are logged in.

Any ideas or examples???


 

The simple way is to check if a user is logged in using If defined in templates. See example here:

http://template.dynamicweb.dk/TemplateTags/Dynamicweb-template-tags/General-tags/If/else-tags.aspx

This example would make it possible to hide prices and "buy" button for users not logged in.

 

If more advanced features are needed it might be a good idea to take a look at the extensibility API's. That would give you endless possibilities.

 

 

But then the pages containing product information still needs to be part of the extranet protected pages? I have tried it - made a page with the extranet login form - but I can't get the user information in the template used for productlist information because it is not part of the extranet......problem is that if they are part of the extranet protected pages you can't access the pages before you are logged in.....

 
Reply

Have you tried using:

 

<!--@If Defined(Global:Extranet.UserName)-->

Show secret information

<!--@EndIf(Global:Extranet.UserName)-->

 

This should work on both protected and unprotected pages, and the secret information should only be displayed if the user is logged on, otherwise it not merged in the final output.

 
Nicolai Høeg Pedersen
Reply
karen wrote:
But then the pages containing product information still needs to be part of the extranet protected pages? I have tried it - made a page with the extranet login form - but I can't get the user information in the template used for productlist information because it is not part of the extranet......problem is that if they are part of the extranet protected pages you can't access the pages before you are logged in.....

Hi Karen

 

The pages does not have to be extranet protected.

 

You just create one page with extranet protection called "Log in" - where users login. Alternatively add a login prompt i.e. below a left navigation where users can log in. That is actually the example from the link I gave you. Add that to a page template, and a login is available on all pages - regardless if they are extranet protected or not.

 

Im sure it will work - if it still does not work after trying the above - mail me a link and some information so I can take a quick look.

 
Reply

Hmmm seems like when I login I am logged off again as soon as I leave the protected pages.

 

Made a page which is extranet protected - contains the log in form.

Logs in and is correctly redirected - as if I am logged in.

At this point I can still access extranet information e.g. username using @Global:Extranet.UserName.....

 

Then I access the pages containing the product information which is not placed in the same area as the log in page.....now I can't access the extranet information. Just tried to write out the username again to see if it worked - nothing is written UserName is now empty??

 
Nicolai Høeg Pedersen
Reply
karen wrote:

Hmmm seems like when I login I am logged off again as soon as I leave the protected pages.

 

Made a page which is extranet protected - contains the log in form.

Logs in and is correctly redirected - as if I am logged in.

At this point I can still access extranet information e.g. username using @Global:Extranet.UserName.....

 

Then I access the pages containing the product information which is not placed in the same area as the log in page.....now I can't access the extranet information. Just tried to write out the username again to see if it worked - nothing is written UserName is now empty??


 

Does the area with the products have another domain/hostname attached to it. If you change hostname you loose your login due to browser things.

 
Reply
np wrote:
karen wrote:

Hmmm seems like when I login I am logged off again as soon as I leave the protected pages.

 

Made a page which is extranet protected - contains the log in form.

Logs in and is correctly redirected - as if I am logged in.

At this point I can still access extranet information e.g. username using @Global:Extranet.UserName.....

 

Then I access the pages containing the product information which is not placed in the same area as the log in page.....now I can't access the extranet information. Just tried to write out the username again to see if it worked - nothing is written UserName is now empty??


 

Does the area with the products have another domain/hostname attached to it. If you change hostname you loose your login due to browser things.

 

Nope - all pages has same domain/hostname the structure is now:

 

Forside

About "company name"

Products

    - product categories e.g. "Shoes"

    ......

    - shop (hidden from navigation)

        - login - just an empty page protected by extranet login accesible from a         Toolbar menu - on all pages.

.......

 

 

"Product" pages right now just uses standard DW templates. If I in e.g. Productlist.html template replaces some of the standard information with <!--@Global:Extranet.UserName--> nothing happens. If I do exactly the same in the template used in the login page it writes out the UserName as I expect......

 
Reply

Found out that a newsletter subscription form made as a global element somehow "disturbs" the extranet login functionality....

Still working on how and why :)

 
Reply
I found out why a while ago. Both modules use the Action param in the URL at some point, that's why.

I had the same problem with news and extranet/intranet also

nuno

 

You must be logged in to post in the forum