I have a trio of questions for your candid feedback as to the best approach.
I have the following content tree for a mutilanguage site
en page1
page2
page3
...
es page1
page2
page3
...
fr page1
page2
page3
...
Question #1 - I kept the same page name for each page type in each supported language instead of translating the name. I created dictionary items for each page name to support the multiple languages. So in the umbTopNavigation.xslt I have the following code snippet which resolves the name:
Is this best practice? or is it better to have the page names translations without having to delegate this to umbTopNavigation.xslt?
Question #2 - One of the benefits I see with keeping the same page names across the languages is in the umbTopNavigation.xslt I can manipulate the CSS class to change the background color of a specific menu item in order to draw attention to it. But the problem I am having is that the pageName in the template is presented as is (i.e. as page1 instead of Page 1 for both languages) and not with the dictionary items. There is no way to dynamically select the right dictionary item without a specific call to a known dictionalry item which defeats the purpose for a document type that support multiple pages.
If this approach is to translate all page names prior to the call of the umbTopNavigation.xslt, how do I include css class styles so I can adjust the background color of some of the menu items without the need for a lengthy <xsl:if/> statement like this:
<xsl:if test="@nodeName= 'page one' or @nodeName = 'de una página' or @nodeName = 'première page'"> <xsl:attribute name="class">hotMaroon</xsl:attribute> </xsl:if>
in order to keep the css style consistent for the same page type across all the languages?
Question #3 - I have some pages which I have translated in ASP.NET using Visual Studio as *.resx files, that are brought into umbraco as macros within the templates. Is this best practice or should I go ahead and place the translated content in the content body of the page and forgo the need to have translated content embedded in *resx files that an editor may not have access to in order to modify the page content?
1. Why do all the pages "need" to have the same name? Is it so that you can switch to the same URL but with a different language later? There's no real need to do this, in fact it might even be slightly better for SEO to have the URL be in the local language.
2. You should change the background of specific menu items according to the nodeTypeAlias, or maybe even a checkbox on your document type. It's not really great to do this by name (remember: your site editors will be able to change the name of the page!).
3. I would definitely make the content editable from withing Umbraco if at all possible, you KNOW it will change and why would you have a CMS if you can't change the content?
1. I'll follow your suggestion to use different names. I believe it is best for the SEO suggestion you've identified
2. I added a Datatype ddlb called sheetsyle with default and specific options. Then I check for these options in the umbTopNavigation.xslt and assign the class name appropriately.
3. I'll follow your suggestion to make the content editable from Umbraco.
I have a header and footer div that contain links to items in my content tree that I do not present in my Navigation bar using the umbTopNavigation.xslt. These pages are for contact Us, Privacy, Terms which I have reserved for the footer div and Sign Up, Sign in links which I have reserved for my header div. If pages are to reflect the culture for which they are created, how do I present the correct link to a translation for the Contact us page (which contains a form) within the footer div (already predefined) without using the UrlName property. I believe the UrlName property is used to predefine the page name?
Could you perhaps post a screendump of how you have structured your content in the content section right now?
If I have understood the post above correctly you should use dictionary items for everything you plan to hardcode in a template for some reason. The downside to this is that you usually don't let the content editors have access to the dictionary items since they're stored in the "Settings" section, that they should not be granted access to.
Best practice when dealing with multiple sites is to simply just copy Site 1, when it's done and then use it as a starter for Site 2 where the content can be translated and some pages can be omitted of they don't make since in a lnaguage. Hope this makes sense.
But would like to see how you structure your content - the structure is key to making it easy to manage the multiple sites.
Upon further review, I was able solve the problem by assigning another property called naviagition location which I used as a filter in an xslt. I did not have to specify a urlName for the lnks after all.
(1) I discovered I will have to maintain a sort order for the links to appear the way I want them for each navigation div. If these are unintentionally offset, it will affect where they appear on the page. Is there another way around?
(2) I was not sure how to include a LoginView in xslt so I've opted for the usercontrol approach for the Top Navigation DIv. I have the following user control which has a LoginView control. How do I get the url and the text resolved for the appropriate cultures without using *.resx?
(3) Do I have to define dictionary items for each Text string and NavigateUrl in support of multiple languages?
If so, how do I incorporate the umbraco code for these into the usercontrol. I assume I'll need the Link to document and nodeName properties for each link. Here is the source of the Top navigation usercontrol.
1. Not sure what you mean, if you sort your nodes in the backoffice, they should sort correctly in the frontend as well, right?
2. You can use Umbraco's dictionary items <%= umbraco.library.GetDictionaryItem("Test") %> (also in codebehind)
3. For each text string yes, not sure what you mean about the navigateUrl exactly. I have a Razor login macro that might help (this is adapted from the version Jonas did, please give his work an upvote)
(1) I am aware they sort correctly, I was of the impression there was another way to present them so someone does not mistakenly offset the sort order.
(2) That's good news. I will use umbraco's Dictionary Items in the code behind.
(3) Thanks for the elaborate feedback. I do not know Razor. However I can read through the code to understand it.
If I were to use the LoginView control provided by ASP.NET, this will mean I will have to add the NavigateUrl values as dictionaty items for the specific language in order to maintain culture sensitive pathnames. Is this true? By NavigateUrl, I mean the property for the HyperLink control shown in the code below:
I have the following code snippet in which the umbraco.library.GetDictionaryItem() is not resolving to the appropriate string from ASP.NET. What am I doing wrong?
Oh and: "(1) I am aware they sort correctly, I was of the impression there was another way to present them so someone does not mistakenly offset the sort order."
I do not understand what you're trying to do, if your editor is not supposed to change the sort order, you can disable the sort option in their permissions. But I'd say: if the editor feels like the "home" link should be in the middle, then who are we to say he's wrong?
Shouldn't be the reason, the data is coming from the cache anyway, which is built on app start and if you see your content then your cache is filled correctly.
Check and double check that the dictionary item is actually called SignUp with a capital S and a capital U:
Also be sure to restart your webserver just in case something in the cache went bad.
So if the above works, you're adding the dictionary items too late in the request pipeline I suppose, I haven't used usercontrols in AGES so I can't remember where to put them, probably in OnInit or something like that?
Guys, its my understanding that the language used by the dictionary item is retrived by the language bound on the hostname mapping.
That means you can only have a one to one mapping between hostname and language.
Looking at your original post - It appears you are seperating your sites (language variations) by a node (i.e en, es etc) but from a hostname binding perspective they are all on the top level root.
Even if you don't set a hostname and language, the dictionary items will still look at the language that is in the current culture so that should not be the problem here. Besides, dictionary items are returning a value, just not in the control Paul is using.
@Seb - Thanks! - That looks promising - I shall take a look.
@Paul - Might be worth taking a look at some of the code behind dictionary with reflector or on codeplex. Often find I revert to looking at umbraco source to figure out the solutions to problems like this!. (sorry - i know its a rubbish answer :P )
Upon much labour over the matter, I was able to get the LoginView to work using the umbraco dictionary items. If there is an interest on how I was able to do so, let me know.
The following may be used for a Navigation Div on a multi-language site. The macro contains a .NET User Control with an embedded LoginView control.
There are basically 3 sets of steps.
1. Do the following in Umbraco:
Assign Dictionary Items for each supported language. You will need one for each text associated with the link displayed and the url itself.
Assign Dictionary Items for each Url. For example - the dictionary item for the FAQ link will be FAQ [which will hold the language translations] and FAQUrl [which wll hold the urls to the translated pages for each language]. You cannot use a virtual link. That is you can not place a value like "~/frequently-asked-questions .aspx". You will have to use "/frequently-asked-questions.aspx" without the tilde "~".
2. Do the following in Visual Studio or whatever IDE in use:
Create a usercontrol for example HeaderNavigationWebUserControl.ascx containing a LoginView.
I have included a sample Templated LoginView control below:
In the partial class of the usercontrol HeaderNavigationWebUserControl.ascx.cs add properties for all the links that will be visible on the page. For example: public partial class HeaderNavigationWebUserControl : System.Web.UI.UserControl { public string DictionaryItemFAQ { get; set; } public string DictionaryItemFAQUrl { get; set; } .......
My usercontrol also has a LoginStatus control so I have Dictionary Items also specified for the Logout text and Login text.
I was not able to change the Login url associated with the LoginStatus control so I had to assign a UrlName for the Login in page for all supported languages to Login
Assign each property to the respective control using the language of choice. I did this in the page_Init method using C#. Here is an example code snippet: protected void Page_Init(object sender, EventArgs e) { try { var FAQLink = (HyperLink)this.FindControl("HyperLinkFAQ"); FAQLink.Text = umbraco.library.GetDictionaryItem(DictionaryItemFAQ); FAQLink.NavigateUrl = umbraco.library.GetDictionaryItem(DictionaryItemFAQUrl); .......
I added events for the Log out link of the LoginStatus control. See code below [This may be overkill]. protected void LoginStatus1_LoggingOut(object sender, LoginCancelEventArgs e) { _currentMember = umbraco.cms.businesslogic.member.Member.GetCurrentMember(); umbraco.cms.businesslogic.member.Member.RemoveMemberFromCache(_currentMember.Id); //Not sure if this is not overkill }
Compile/Build you usercontrol and perform the steps to move the usercontrol and the solution dll to the respective folders of your umbraco site. UserControls in the usercontrols folder and the *.dll in the bin folder.
3. Do the following in Umbraco:
In umbraco, add a new macro. For simplicity, I called it Header Navigation. This will be used to reference your just added .NET User Control.
Click Save to save changes made to the macro.
click on the Browse Properties button beneath the .NET User Control entry textbox.
This will reveal a Browse Propertise dialog containing all the properties you added to the HeaderNavigationWebUserControl.ascx.cs partial class in Visual Studio or whatever programming environment you used to creat the user control. The checkboxes to the left of them should be check.
Click on the Save properties button within the dialog
A message confirming theaddition of those properties is presented along with a list of the properties just added.
Close the Browse Properties dialog and click
Click on the save icon on the Header Navigation macro page.
Click on the parameters tab on the Header Navigation macro. You should see all the listed properties as parameters. All have a datatype text.
Now within the Sections legend, click on Settings and open the Template folder to reveal the list of templates within your umbraco solution.
Select the template where you want to place the newly created macro.
Add the newly created macro and specify the Dictionary Items without the # [hash].
Save your changes.
Test your macro for every language supported by your site. It should work as expected.
Multilanguage sites - Best Practice
Hello All,
I have a trio of questions for your candid feedback as to the best approach.
I have the following content tree for a mutilanguage site
en
page1
page2
page3
...
es
page1
page2
page3
...
fr
page1
page2
page3
...
Question #1 - I kept the same page name for each page type in each supported language instead of translating the name. I created dictionary items for each page name to support the multiple languages. So in the umbTopNavigation.xslt I have the following code snippet which resolves the name:
<a class="navigation" href="{umbraco.library:NiceUrl(@id)}">
<span><xsl:value-of select="umbraco.library:GetDictionaryItem(@nodeName)"/></span>
</a>
Is this best practice? or is it better to have the page names translations without having to delegate this to umbTopNavigation.xslt?
Question #2 - One of the benefits I see with keeping the same page names across the languages is in the umbTopNavigation.xslt I can manipulate the CSS class to change the background color of a specific menu item in order to draw attention to it. But the problem I am having is that the pageName in the template is presented as is (i.e. as page1 instead of Page 1 for both languages) and not with the dictionary items. There is no way to dynamically select the right dictionary item without a specific call to a known dictionalry item which defeats the purpose for a document type that support multiple pages.
If this approach is to translate all page names prior to the call of the umbTopNavigation.xslt, how do I include css class styles so I can adjust the background color of some of the menu items without the need for a lengthy <xsl:if/> statement like this:
<xsl:if test="@nodeName= 'page one' or @nodeName = 'de una página' or @nodeName = 'première page'">
<xsl:attribute name="class">hotMaroon</xsl:attribute>
</xsl:if>
in order to keep the css style consistent for the same page type across all the languages?
Question #3 - I have some pages which I have translated in ASP.NET using Visual Studio as *.resx files, that are brought into umbraco as macros within the templates. Is this best practice or should I go ahead and place the translated content in the content body of the page and forgo the need to have translated content embedded in *resx files that an editor may not have access to in order to modify the page content?
Thank you for your assistance in this matters.
1. Why do all the pages "need" to have the same name? Is it so that you can switch to the same URL but with a different language later? There's no real need to do this, in fact it might even be slightly better for SEO to have the URL be in the local language.
2. You should change the background of specific menu items according to the nodeTypeAlias, or maybe even a checkbox on your document type. It's not really great to do this by name (remember: your site editors will be able to change the name of the page!).
3. I would definitely make the content editable from withing Umbraco if at all possible, you KNOW it will change and why would you have a CMS if you can't change the content?
Hope this helps.
Thanks for your response.
1. I'll follow your suggestion to use different names. I believe it is best for the SEO suggestion you've identified
2. I added a Datatype ddlb called sheetsyle with default and specific options. Then I check for these options in the umbTopNavigation.xslt and assign the class name appropriately.
3. I'll follow your suggestion to make the content editable from Umbraco.
Thank you for support, it is very helpful.
I have a header and footer div that contain links to items in my content tree that I do not present in my Navigation bar using the umbTopNavigation.xslt. These pages are for contact Us, Privacy, Terms which I have reserved for the footer div and Sign Up, Sign in links which I have reserved for my header div. If pages are to reflect the culture for which they are created, how do I present the correct link to a translation for the Contact us page (which contains a form) within the footer div (already predefined) without using the UrlName property. I believe the UrlName property is used to predefine the page name?
Hi Paul
Could you perhaps post a screendump of how you have structured your content in the content section right now?
If I have understood the post above correctly you should use dictionary items for everything you plan to hardcode in a template for some reason. The downside to this is that you usually don't let the content editors have access to the dictionary items since they're stored in the "Settings" section, that they should not be granted access to.
Best practice when dealing with multiple sites is to simply just copy Site 1, when it's done and then use it as a starter for Site 2 where the content can be translated and some pages can be omitted of they don't make since in a lnaguage. Hope this makes sense.
But would like to see how you structure your content - the structure is key to making it easy to manage the multiple sites.
/Jan
Upon further review, I was able solve the problem by assigning another property called naviagition location which I used as a filter in an xslt. I did not have to specify a urlName for the lnks after all.
Ah, I missed the rest of these posts yesterday, sorry, but that would've been my suggestion as well, great! :-)
Yet another kink in my pursuit of a solution.
(1) I discovered I will have to maintain a sort order for the links to appear the way I want them for each navigation div. If these are unintentionally offset, it will affect where they appear on the page. Is there another way around?
(2) I was not sure how to include a LoginView in xslt so I've opted for the usercontrol approach for the Top Navigation DIv. I have the following user control which has a LoginView control. How do I get the url and the text resolved for the appropriate cultures without using *.resx?
(3) Do I have to define dictionary items for each Text string and NavigateUrl in support of multiple languages?
If so, how do I incorporate the umbraco code for these into the usercontrol. I assume I'll need the Link to document and nodeName properties for each link. Here is the source of the Top navigation usercontrol.
<div id="TopLeftSection">
<asp:Panel ID="PanelAnonymous" runat="server">
<ul>
<li><asp:Hyperlink ID="HyperLinkTellSomeOne" runat="server" NavigateUrl="~/TellSomeOne.aspx" Text="Tell someone" ></asp:Hyperlink></li>
<li><asp:Hyperlink ID="HyperLinkFAQ" runat="server" NavigateUrl="~/FAQ.aspx" Text="FAQ"></asp:Hyperlink></li>
</ul>
</asp:Panel>
</div>
<div id="TopRigtSection">
<asp:Panel ID="PanelAuth" runat="server" >
<ul>
<li><asp:Label ID="lblFullNamePrompt" runat="server" /></li>
<asp:LoginView ID="LoginView1" runat="server">
<AnonymousTemplate>
<li><asp:Hyperlink ID="HyperLinkSignUp" runat="server" NavigateUrl="~/SignUp.aspx" Text="Sign up" ></asp:Hyperlink></li>
</AnonymousTemplate>
<LoggedInTemplate>
<li><asp:Hyperlink ID="HyperLinkMyProfile" runat="server" NavigateUrl="~/MyProfile.aspx" Text="My Profile"></asp:Hyperlink></li>
</LoggedInTemplate>
</asp:LoginView>
<li><asp:LoginStatus ID="LoginStatus1" runat="server" LoginText="Sign in" LogoutPageUrl="~/Default.aspx" LogoutText="Sign out" /></li>
</ul>
</asp:Panel>
</div>
1. Not sure what you mean, if you sort your nodes in the backoffice, they should sort correctly in the frontend as well, right?
2. You can use Umbraco's dictionary items <%= umbraco.library.GetDictionaryItem("Test") %> (also in codebehind)
3. For each text string yes, not sure what you mean about the navigateUrl exactly. I have a Razor login macro that might help (this is adapted from the version Jonas did, please give his work an upvote)
(1) I am aware they sort correctly, I was of the impression there was another way to present them so someone does not mistakenly offset the sort order.
(2) That's good news. I will use umbraco's Dictionary Items in the code behind.
(3) Thanks for the elaborate feedback. I do not know Razor. However I can read through the code to understand it.
If I were to use the LoginView control provided by ASP.NET, this will mean I will have to add the NavigateUrl values as dictionaty items for the specific language in order to maintain culture sensitive pathnames. Is this true? By NavigateUrl, I mean the property for the HyperLink control shown in the code below:
Can this be done using the LoginView Control?
<asp:LoginView ID="LoginView1" runat="server">
<AnonymousTemplate>
<li><asp:Hyperlink ID="HyperLinkSignUp" runat="server" NavigateUrl="~/ThisWillBeTranslatedForTheSpecificCluture-SignUp.aspx" Text="Sign up" ></asp:Hyperlink></li>
</AnonymousTemplate>
<LoggedInTemplate>
<li><asp:Hyperlink ID="HyperLinkMyProfile" runat="server" NavigateUrl="~/ThisWillBeTranslatedForTheSpecificCluture-MyProfile.aspx" Text="ThisWillBeTranslatedForTheSpecificCluture-My Profile"></asp:Hyperlink></li>
</LoggedInTemplate>
</asp:LoginView>
<li><asp:LoginStatus ID="LoginStatus1" runat="server" LoginText="ThisWillBeTranslatedForTheSpecificCluture-Sign in" LogoutPageUrl="~/Default.aspx" LogoutText="ThisWillBeTranslatedForTheSpecificCluture-Sign out" /></li>
</ul>
</asp:Panel>
I have the following code snippet in which the umbraco.library.GetDictionaryItem() is not resolving to the appropriate string from ASP.NET. What am I doing wrong?
<div id="TopRigtSection">
<asp:Panel ID="PanelAuth" runat="server" meta:resourcekey="PanelAuthResource1" >
<ul>
<asp:LoginView ID="LoginView1" runat="server">
<AnonymousTemplate>
<li><asp:Hyperlink ID="HyperLinkSignUp" runat="server" NavigateUrl="<%= umbraco.library.GetDictionaryItem('SignUpUrl')%>"
Text="<%= umbraco.library.GetDictionaryItem('SignUp')%>"></asp:Hyperlink></li>
</AnonymousTemplate>
<LoggedInTemplate>
<li><asp:Hyperlink ID="HyperLinkMyProfile" runat="server"
NavigateUrl="<%= umbraco.library.GetDictionaryItem('MyProfileUrl')%>" Text="<%= umbraco.library.GetDictionaryItem('MyProfile')%>"></asp:Hyperlink></li>
</LoggedInTemplate>
</asp:LoginView>
<li class="hide-border"><asp:LoginStatus ID="LoginStatus1" runat="server"
LoginText="<%= umbraco.library.GetDictionaryItem('SignIn')%>" LogoutPageUrl="~/Default.aspx" LogoutText="<%= umbraco.library.GetDictionaryItem('LogOff')%>" /></li>
</ul>
</asp:Panel>
</div>
They appear as strings like this:
...
<%= umbraco.library.GetDictionaryItem('SignUp')%>
<%= umbraco.library.GetDictionaryItem('SignIn')%>
...
Try to change the single quotes to doubles, vice versa. For example:
<asp:Hyperlink ID="HyperLinkSignUp" runat="server" NavigateUrl='<%= umbraco.library.GetDictionaryItem("SignUpUrl") %>' />
Oh and: "(1) I am aware they sort correctly, I was of the impression there was another way to present them so someone does not mistakenly offset the sort order."
I do not understand what you're trying to do, if your editor is not supposed to change the sort order, you can disable the sort option in their permissions. But I'd say: if the editor feels like the "home" link should be in the middle, then who are we to say he's wrong?
Swaping the all the quotes from singel to double and vis versa did not make a difference.
Okay, don't know then. Do the dictionary items exist, with the same key? Try to inspect the value in debug and see what's going on.
Yes they do...simply perplexed!
Try somewhere in there:
setting string aDicItem = umbraco.library.GetDictionaryItem("SignUp"); return an empty string.
Is the reason behind this problem due to my inability to connect to the umbraco.sdf from VS 2010?
Shouldn't be the reason, the data is coming from the cache anyway, which is built on app start and if you see your content then your cache is filled correctly.
Check and double check that the dictionary item is actually called SignUp with a capital S and a capital U:
Also be sure to restart your webserver just in case something in the cache went bad.
This
<divrunat="server">
</div>
does not return nothing.
I've also checked the Dictionary names.. They are as expected.
So if the above works, you're adding the dictionary items too late in the request pipeline I suppose, I haven't used usercontrols in AGES so I can't remember where to put them, probably in OnInit or something like that?
I attempted the following to see if Page_Init would make a difference. But it did not
string aTestSample = string.Empty;
protected void Page_Init(object sender, EventArgs e)
{
aTestSample = library.GetDictionaryItem("TellAFriend");
}
protected void Page_Load(object sender, EventArgs e)
{
try
{
//userFullNameInfo();
string aTestSample2 = aTestSample;
}
catch (ArgumentException ae)
{
throw ae;
}
}
I've checked an old project and in my codebehind I do this in the Page_Load, have you tried this? (change control's ID and type to yours of course):
Guys, its my understanding that the language used by the dictionary item is retrived by the language bound on the hostname mapping.
That means you can only have a one to one mapping between hostname and language.
Looking at your original post - It appears you are seperating your sites (language variations) by a node (i.e en, es etc) but from a hostname binding perspective they are all on the top level root.
Shamless plug :p its a problem I am encouting and trying to resolve on this thread http://our.umbraco.org/forum/using/ui-questions/25868-Advice-required-for-best-multilingual-approach
@Adam I think I have ran into a similar problem in the past and my solution was to run some code on every page that sets the current locale all the time, got it from here: http://our.umbraco.org/forum/developers/api-questions/11342-Umbraco-overriding-SystemThreadingThreadCurrentThreadCurrentCulture
Even if you don't set a hostname and language, the dictionary items will still look at the language that is in the current culture so that should not be the problem here. Besides, dictionary items are returning a value, just not in the control Paul is using.
Sebastiaan Janssen, I tried your recommendation:
var SignUpLink = (HyperLink)LoginView1.FindControl("HyperLinkSignUp");
SignUpLink.Text = umbraco.library.GetDictionaryItem("SignUp");
SignUpLink.NavigateUrl = umbraco.library.GetDictionaryItem("SignUpUrl");
@Paul Replied at almost the same time.. ;-)
Just to confirm, do you have a hostname set on the root of your site with a language that has a translation for HyperLinkSignUp, SignUp and SignUpUlr?
Yes Sir!
@Seb - Thanks! - That looks promising - I shall take a look.
@Paul - Might be worth taking a look at some of the code behind dictionary with reflector or on codeplex. Often find I revert to looking at umbraco source to figure out the solutions to problems like this!. (sorry - i know its a rubbish answer :P )
I'll take your advice. Thanks for trying!
All,
Upon much labour over the matter, I was able to get the LoginView to work using the umbraco dictionary items. If there is an interest on how I was able to do so, let me know.
Yes, I am VERY interested in how you got it to work, if only to help out the next person to search for this kind of thing. :-)
Since you asked.
The following may be used for a Navigation Div on a multi-language site. The macro contains a .NET User Control with an embedded LoginView control.
There are basically 3 sets of steps.
1. Do the following in Umbraco:
2. Do the following in Visual Studio or whatever IDE in use:
<asp:LoginView ID="LoginView1" runat="server">
<AnonymousTemplate>
<li><asp:Label ID="lblFullNamePrompt" runat="server" /></li>
<li><asp:Hyperlink ID="HyperLinkSignUp" runat="server"></asp:Hyperlink></li>
</AnonymousTemplate>
<LoggedInTemplate>
<li><asp:Label ID="lblFullNamePrompt" runat="server" /></li>
<li><asp:Hyperlink ID="HyperLinkMyProfile" runat="server" ></asp:Hyperlink></li>
</LoggedInTemplate>
</asp:LoginView>
<li class="hide-border"><asp:LoginStatus ID="LoginStatus1" runat="server" LogoutPageUrl="~/Default.aspx"
LogoutAction="Redirect" onloggedout="LoginStatus1_LoggedOut" onloggingout="LoginStatus1_LoggingOut" /></li>
</ul>
public partial class HeaderNavigationWebUserControl : System.Web.UI.UserControl
{
public string DictionaryItemFAQ { get; set; }
public string DictionaryItemFAQUrl { get; set; }
.......
protected void Page_Init(object sender, EventArgs e)
{
try
{
var FAQLink = (HyperLink)this.FindControl("HyperLinkFAQ");
FAQLink.Text = umbraco.library.GetDictionaryItem(DictionaryItemFAQ);
FAQLink.NavigateUrl = umbraco.library.GetDictionaryItem(DictionaryItemFAQUrl);
.......
protected void LoginStatus1_LoggingOut(object sender, LoginCancelEventArgs e)
{
_currentMember = umbraco.cms.businesslogic.member.Member.GetCurrentMember();
umbraco.cms.businesslogic.member.Member.RemoveMemberFromCache(_currentMember.Id); //Not sure if this is not overkill
}
protected void LoginStatus1_LoggedOut(object sender, EventArgs e)
{
FormsAuthentication.SignOut();
}
3. Do the following in Umbraco:
Thank you very much Paul for this elaborate explanation, how great of you to spend the time, you rock!!
is working on a reply...