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, ...Company branding based on user profileCompany branding based on user profile
Previous
 
Next
New Post
7/25/2008 3:15 PM
 

Here is my situation that I'm hoping you DNN gurus can shed light on.

My client has a DNN 4x web site that serves users of their (multiple) clients.  They want the page header to include both their (static) company logo plus the logo of the company that the user belongs to.  I believe this is called branding.  I'm clueless on how to do this....maybe modify something in the page_load?

I added a Company_Code field to the user registration module.  The user has to type in their company's unique registration code (which is SQL validated).  After registration, I store the associated company_id along with the user data. 

Requirement: after the user logs in, each page should look at the user's associated company_id and display the appropriate company logo (along with the static company logo of the host company--thus, two logos or similar).

Make sense?  Suggested solutions?

This would be really easy to do in a normal ASP.Net web site but I'm not sure how to approach the problem using DNN.

Many thanks for guidance!

 
New Post
7/25/2008 9:13 PM
 

Here is how I would approach it.

First, each user can be assigned to a security role, and you could define a security role for each company or client.  The trick would then be to automatically assign the roles, based on the profile.  You can do this most easily with a module like DataSprings' DYnamic Registration module.

Second, having assigned each user to a security role, you can use that to determine what information to show to a specific logged in user. 

  • You can put conditional coding in your site skin.  Look at the DotNetNuke support forums a snapsis.com for some great examples.
  • You can make entire pages or just modules on a page visible or invisible to certain security roles.  So, you could have three versions of a particular text/html module, with one being for each of 3 security roles.
  • I believe that the new Tokens in the Text/HTML module include some conditional tokens.  You can use them within the Text/HTML module to show particular blocks of stuff to specific roles. 
  • Token replacement is slowly migrating to other modules.  They are in UDT (where the first were introduced) and may now be available in other modules.  I haven't been keeping up, but I believe that the plan is to provide replaceable tokens for lots of the core modules, whereever that is appropriate.


As I said, that would be my starting point.  I hope that other also have some ideas that they can contribute.




Joe Craig
Patapsco Research Group, Ellicott City, MD
DotNetNuke Development and Services (http://patapscorg.com)
 
New Post
7/26/2008 11:24 PM
 

Joe,

Thanks for the ideas.  The only requested branding (as of now) is the company-specific logo based on the logged-in user.  I have never messed with skinning (not my cup of tea) but I will have a look at the skin forums to learn about conditional coding.

I am using a trial version of DS' Dynamic Registration module to test the custom Company Code field and SQL validation (works well).

Thanks again for your time.

Troy

 
New Post
7/28/2008 10:11 AM
 

Hmmm, I've searched high and low for info on "conditional coding" for DNN skins but have come up empty.  It seems that skin authors try to go with pure CSS skins.  The free skins I've downloaded contain no C#/VB code.  As such, I'm spinning my wheels.

Will someone please point my Jethro noggin to a resource that explains conditional coding for DNN skins?  Again, I'm looking to display company-branded logos in each page header based on the user's security role (or user profile data, such as company_id).

Many thanks!

Troy

 
New Post
7/28/2008 4:10 PM
 

<div class="<%=DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo.UserName%>">

</div>

In an ASCX skin will render div with a class with the name of the logged in user.

You could set the background-image with CSS

Or this:

<img src="Logo<%=DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo.UserName%>.gif" alt="Logo" />

Will render Logo.gif if not logged in and LogoAdmin.gif if the admin logged is in.

BTW, I didn't test this, so you might need some tweaks

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Company branding based on user profileCompany branding based on user profile


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