Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Customising skins with framework attritubes & skin object - QuestionsCustomising skins with framework attritubes & skin object - Questions
Previous
 
Next
New Post
8/11/2010 12:34 PM
 

Hi

So I've been doing some pretty custom work for a large project and specifically been using Timo's DNN Framework Attributes Example Skin to help me get by on some of the custom features the site needs... I don't know if this is a skinning question or an administration question, but here goes...

I needed a message at the top of my skin, near the login that welcomed users that weren't logged in, but that showed the user's username if they were logged in. Like so:

  • Not logged in: Welcome Guest!
  • Logged in: Welcome Display Name! e.g. Welcome Shebang Websites!

So, here's the code (.ASCX skinning) for this:

<p>Welcome <span class="show-username"><%= UserController.GetCurrentUserInfo().Displayname %></span><%=IIf(Request.IsAuthenticated, "", "Guest")%>!</p>

This seems to work and work well... Note, the ".Displayname" call is not listed in Timo's example skin, but does indeed work. Go figure...

But, what I also need though, is for the Register Token, to be displayed as "My Account" and not "Register". This is also fairly simple, using the "text" property for the token:

<ul>
<li><dnn:USER runat="server" id="dnnUSER"  cssclass="null-class" text="My Account" /></li>
<li><dnn:LOGIN runat="server" id="dnnLOGIN" cssclass="null-class" text="Login" LogoffText="Logout" /></li>
</ul>

Not quite though, because when logged into the site, "My Account" is substituted with the Display Name, e.g. John Smith. This is not the desired result...

You'll notice on the Login token has properties for "Text" and "LogoffText" - this allows you to customize exactly that. i.e. the text for the Login token when you're logged out as opposed to when you're logged in. BUT, the Register token only seems to allow you to add the logged out text property. I've checked the VB for this skin object, and it appears that the "when-logged-in" text is set as a constant - i.e. cannot be targeted with properties from the skin object injection.

So, my question is an either or one:

How can I set the Register token's / skin object's text to display as "My Account" without changing anything in the core?

OR

Is there a link attribute that I can call that will give me the same linking result as the Register token, in that, when you're not logged in the link directs you to the registration page, but when you are logged in, it takes you to the account manager..? Something like the java-link that is added to the token:

 __doPostBack('dnn$dnnUSER$cmdRegister','')

But not the actual javascript function, I'd prefer something like this:

<a href="<%=NavigateUrl(PortalSettings.RegisterTabId)%>">My Account</a>

I haven't tried this myself yet... And again, it needs to give you the same results as the Register token...

I've tried to be as articulate as possible. Shout if there is something you don't understand. Any help and insight would be appreciated... Timo..?

Thanks in advance.
Jon


Shebang Websites - A product of Mogridge Design
Hey, we're partnered with UntangleMyWeb.com

 
New Post
8/11/2010 1:05 PM
 
The text you speak of is "localized" and can be changed.  Simply go to the Languages page in your Admin Menu and choose to edit the localization file for the following:

~/LocalResources/Admin/Skins/App_LocalResource/User.ascx

Then, find the field to change the value for Register.Text.  Save your changes.

Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
New Post
8/11/2010 2:14 PM
 

Hi Will

What you're suggesting is easily done when injecting the skin object into the .ASCX skin, like so:

<dnn:USER runat="server" id="dnnUSER" cssclass="null-class" text="My Account" />

I mentioned this above, I'm sure... That's what you're changing when setting the "text" property in the skin object.

Hate to say it, but it's not the solution I'm looking for... Sorry. Thank you though for the help.

Still need help and insight guys... Any help will do... Really, even options that at least eliminate possibilities are worth throwing up there.

Jon


Shebang Websites - A product of Mogridge Design
Hey, we're partnered with UntangleMyWeb.com

 
New Post
8/11/2010 2:22 PM
 
The text value in the skin object itself only is used when the localized text doesn't exist.  (For example, if the language pack is not installed.)  I don't think this has changed.  

Have you tried it?

Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
New Post
8/11/2010 2:39 PM
 
Disclaimer - I've not tried this with Register but I expect it to work.  I have done this with an number of the stnadard code skin objects.

Copy the register object and give it a new name.  Adjust the skin to use your fresh object.

Now change YOUR register object to do what you want.

You didn't change the core.  If an upgrade drops a new version of register onto your system it will NOT hit your custom version and your skin will still pick up your custom version.  Of course if your custom version does not work with the new upgrade (unlikely but conceivable) then you will have some work to do.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Customising skins with framework attritubes & skin object - QuestionsCustomising skins with framework attritubes & skin object - Questions


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out