Want to add code to show menu only if a customer is logged in.
Can this be added to the master file?
Want to add code to show menu only if a customer is logged in.
Can this be added to the master file?
Absolutely.Do the following changes below.
(1) From {root}/app_code folder, open MasterPageBase.cs file, and add this method:
(2) In {root}/App_Templates/Skin_#/temaplate.master file:
![]()
I used it to show CAT in left menu. Thank you!!!!!
<% if (IsLogIn)
{ %>
<aspdnsf:EntityControl ID="ctrlEntityCategory" runat="server" Header="<%$ Tokens:StringResource, AppConfig.CategoryPromptPlural %>"
EntityType="Category" MaxMenuSize="<%$ Tokens:AppConfigUSInt, MaxMenuSize %>" />
<% } %>
This is such a common request the IsLoggedIn property should be included in the mainline source code for ASPDNSF. This way we don't have to modify it every time we upgrade.
ML9.3.1.1
SQL 2012 Express
VS 2010
Azure VM