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, ...dynamic skindynamic skin
Previous
 
Next
New Post
12/3/2008 6:36 PM
 

I have a LeftPane and RightPane which are side by side.  The RightPane top left corner curves into the LeftPane.  Both panes are colored differently.  If the RightPane is empty then the corner image will be differnent (transparent background) vs. if the RightPane is visible (colored background).

Using a table I will create ContentPane, LeftPane, Cell1, Cell2, RightPane, Cell3. 

If there are no empty panes then all is good.

If LeftPane is empty, then I need to make Cell1 hidden.

If RightPane is empty then I need to make Cell2 and Cell3 hidden.

Initially I used absolute positioned DIV's inside the cells to position my border images, which worked great.  The content insde the pane layered on top of the divs.  The problem was that the dnnMenu for the modules uses positioning and therefore, displays off the screen.  I would use another menu if I knew how.  I was hoping that this new method was going to be easier, but I'm finding it rather difficult atm.

 
New Post
12/4/2008 2:52 AM
 

Well the class is there to hide the pane, and you are trying to hide something outside the pane.

That's why I would use a background-image on the TD, you can position it anywhere you want (with background-position and if you need space add a padding to the TD) and remove / change it with the DNNEmptypane class

 

 
New Post
12/4/2008 1:18 PM
Accepted Answer 

I appreciate your help, unfortunately, I need multiple images within the container and one of them needs to be different depending on if the RightPane is visible or not.

I did find a solution, however.  I am curious if there is any advice against it or not so I'm posting my solution below.

1.  Use server side code to check if the pane contains the class "DNNEmptyPane".

2.  Use an event from a server side pane that comes after the pane you are checking.  (I added a "dummy" pane called "BottomPane" that is my final pane and therefore using it's event's to check the previous panes class names.)

3.  Create and add an HtmlLink to the page.

    Protected Sub BottomPane_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim value As String = RightPane.Attributes("Class").Contains("DNNEmptyPane").ToString & _
                              LeftPane.Attributes("Class").Contains("DNNEmptyPane").ToString
       
        Dim link As HtmlLink = New HtmlLink
        link.ID = value
        Select Case value
            Case "TrueTrue"
                link.Attributes.Add("href", "~/Portals/0/Skins/CB Deco 1.5/css/RS.css")
            Case "FalseTrue"
                link.Attributes.Add("href", "~/Portals/0/Skins/CB Deco 1.5/css/RS-R.css")
            Case "TrueFalse"
                link.Attributes.Add("href", "~/Portals/0/Skins/CB Deco 1.5/css/RS-L.css")
            Case "FalseFalse"
                'Me.BottomPane.Visible = False
                Exit Sub
        End Select
       
        link.Attributes.Add("type", "text/css")
        link.Attributes.Add("rel", "stylesheet")
        Me.Page.Header.Controls.Add(link)
        'Me.BottomPane.Visible = False

    End Sub
 

If you dont want the BottomPane to appear during the design time of the site then uncomment the last line.

 
New Post
12/5/2008 3:18 AM
 

This solution seems fine to me.

You could use also dummy label, or one of the events of the pane itself, later in the process (where the attributes of the pane are known)

 
New Post
12/5/2008 2:15 PM
 

Thank so much for your feedback, without it I would not have been able to figure out what class to look for.  As for using an event of the pane later in the process I'm not sure how to do that.  I tested each panes event...some didn't seem to fire at all...and none of them seemed to fire after dnn added the class name.  Perhaps the event didn't properly register in the html, so I could try that again...unless theres something else I should do.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...dynamic skindynamic skin


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