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, ...Replace a string per pageReplace a string per page
Previous
 
Next
New Post
8/13/2012 6:48 AM
 

Hi,

i'm creating a skin and i want to control the main DIV ID per page.

means that if i have 2 pages that uses this skin, i want to provide my portal admin the ability to set the ID of the main Div per page.

is there a way to achieve that?


thanks,


Omri

 
New Post
8/14/2012 5:17 AM
 

Not really, but our free style helper skin object does allow you to solve this is another way.

A. You could render the page id or page name or page order class to the body tag using the BodyClass attribute.

<fortyfingers:STYLEHELPER ID="SH1" AddBodyClass="True" runat="server" />

Result:

On a page "SubPage" on Level 1 which is a child of the page "RootPage" on Level 0 ,
this will be your body tag (with the default settings):

<body id="Body" class="L0_RootPage L1_SubPage Id68 Id100 L0_Nr3 L1_Nr2">

Explanation:
L0_RootPage > The current pages parent on level 0 named "RootPage"
L1_SubPage > The current page on Level 1, named "SubPage"
Id68 > The "RootPage" Id = 68
Id100 > The "SubPage" Id = 100
L0_Nr3 > "RootPage" is the third page on level 0
L1_Nr2 > "SubPage" is the second page on level 1

If you need a "manual switch" create a role for it and let the user assign view rights for that role to the page.

If the Role would be named "Version2"

You could make this your main div in the skin:

<div id='<%=IIf (Portalsettings.Activetab.AuthorizedRoles.Contains("Version2"), "Version2", "Version1")%>'>

</div>

 

 
New Post
4/29/2016 5:05 PM
 
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Replace a string per pageReplace a string per page


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