Showing posts with label dotnuke skinning. Show all posts
Showing posts with label dotnuke skinning. Show all posts

Tuesday, September 9, 2008

Dynamically Switching DotNetNuke StyleSheets with the Current Language

If your design requires you to embed text in an image in a multi-lingual DotNetNuke website, embed your text into images and switch them with CSS.

Simply override the styles from the base module.css stylesheet in a separate stylesheet and switch them dynamically using the following line of code directly in your skin:


<link href="<%= SkinPath %>languagespecific-<% =CType(Page, PageBase).PageCulture.Name %>.css" rel="stylesheet" type="text/css" />


This will be rendered as the filename languagespecific-en-US.css in the root of your skin for the default DNN language and switch every time the user switches their language.

Happy Nuking,

Ryan Morgan
Arrow Consulting & Design

Arrow Consulting & Design is a consulting firm based in West Palm Beach, Florida specializing in DotNetNuke, ASP.NET, SQL and WPF Development with a portfolio filled with local, national, government and global enterprise clients.

Case Studies: Click Here
Main Corporate Site: http://www.arrowdesigns.com/default.aspx?utm_source=blogspot
DotNetNuke Community Site: http://www.arrownuke.com/default.aspx?utm_source=blogspot
Consulting Inquiries: Click Here
Skin Design/Conversion: Click Here
DotNetNuke Portfolio: Click Here

Saturday, August 9, 2008

Positioning the Admin Control Panel in a DNN Skin

Most times the default placement for the administration control panel doesn't cause any problem, but if you want to move the control panel in a dotnetnuke skin while you're creating your custom dnn skin you can easily do that by using the appropriate naming convention.

Similar to how your ContentPane is placed by naming an HTML container like a table cell (TD) or div correctly with the runat="server" attribute, you simply need to name a containing HTML element with the id "ControlPanel".

Example:
<div id="ControlPanel" runat="server"/>

With this knowledge, we can add a small server-side script to the top of the skin that can manage the visibility of the control panel. In my next post, I'll show you how to use this to use a custom role to display the control panel to a designated role. (View the post here: http://dotnetnuke-skin.blogspot.com/2008/08/creating-custom-role-to-display-admin.html)

Happy Nuking,

Ryan Morgan




Arrow Consulting & Design is a consulting firm based in West Palm Beach, Florida specializing in DotNetNuke, ASP.NET, SQL and WPF Development with a portfolio filled with local, national, government and global enterprise clients.

Case Studies: Click Here
Main Corporate Site: http://www.arrowdesigns.com/
DotNetNuke Community Site: http://www.arrownuke.com/
Consulting Inquiries: Click Here
Skin Design/Conversion: Click Here
DotNetNuke Portfolio: Click Here