Register | Login

ZettaCube Forum and Knowledge Base

Welcome to ZettaCube forum. Here you can discuss various issues regarding our ZeeControls product. If you want to contact our developers directly, please email to support@zettacube.com.

Please register to post a message. Registration is immediate and free. Return users please login here.

 
  Forum  Discussions  WebLayout and W...  Advice on using nested master pages
Previous Previous
 
Next Disabled
New Post 9/4/2009 4:40 AM
  Mike Thomas
4 posts
No Ranking


Advice on using nested master pages 

 Hi,

I'm trying to use the web layout controls within nested master pages, but struggling to see how I can get this to work.

What I would like is a root master page that contains the the main web layout control and also one panel that contains the page header. Then, I would like different master pages nested within the root master to produce different layouts, since different pages have different requirements.

I have the following snippet of code in the root master with the problem areas highlighted.

    <form id="form1" runat="server">

    <cc1:WebLayout ID="wlMain" runat="server" Height="200px" Width="200px" FitParent="FitWindow"

        Orientation="Horizontal">

        <Panels>

            <cc1:WebLayoutPanel ID="wlpHeader" runat="server" Filled="false" MaxSize="100" MinSize="100"

                Overflow="Hidden" BorderStyle="None">

                <Content>

                    Here is the header

                </Content>

            </cc1:WebLayoutPanel>

                    <asp:ContentPlaceHolder ID="cplRootContent" runat="server">

                    </asp:ContentPlaceHolder>

        </Panels>

    </cc1:WebLayout>

    </form>

I want the nested master page to dictate the next WebLayoutPanel layout, but it seems I can't put asp:ContentPlaceHolder's here since this generates an error.

Replacing the above two highlighted lines with this works:

            <cc1:WebLayoutPanel ID="wlpContent" runat="server">

                <Content>

                    <asp:ContentPlaceHolder ID="cplRootContent" runat="server">

                    </asp:ContentPlaceHolder>

                </Content>

            </cc1:WebLayoutPanel>

But then the root master is dictating the size, etc of the next panel, not the nested master.

Is it it possible to use nested masters in this way?

 
New Post 9/4/2009 5:57 AM
  ZettaCube Support
64 posts
No Ranking


Re: Advice on using nested master pages 

Dear Mike,

Inside <cc1:WebLayout><Panels> ... </Panels></cc1:WebLayoutPanel>, there could only be one or more <WebLayoutPanel>.   So the ContentPlaceHolder must live within a WebLayoutPanel as you pointed out.

You might need to write some JavaScript code to control the size of the second panel according to the nested master loaded.

 

 
New Post 9/4/2009 6:26 AM
  Mike Thomas
4 posts
No Ranking


Re: Advice on using nested master pages 

 OK, but I still have the issue that the master contains a web layout control that I don't want.

Here's a bit more detail on the types of layouts I need and how I would *like* to implement using nestedt masters. (By the way, all of these work fine as separate masters, but I don't want duplicated code spread across masters!)

Login screen

WebLayout

WebPanel (Header) - Root master

Web Panel (Content) - Nested master #1

Non patient  screen

WebLayout

WebPanel (Header) - Root master

Web Panel (Menubar) - Nested master #2 + all panels below

Web Panel( Content Area)   

Web Splitter Panel (Nav) 

Web Splitter Panel (Content)

 

Patient screen

WebLayout

WebPanel (Header) - Root master

Web panel (Patient Information) - Nested master #3 + all panels below

Web Panel (Menubar) 

Web Panel( Content Area)   

Web Splitter Panel (Nav) 

Web Splitter Panel (Content)

The problem would be that the master would have a containing web panel that then contains all the other panels. So the hiearachy structure will be something like:

WebLayout

WebPanel (Header) - Root master

Web Panel (Container) - Root master

Web panel (Patient Information) - Nested master + all panels below

Web Panel (Menubar) 

Web Panel( Content Area)   

Web Splitter Panel (Nav) 

Web Splitter Panel (Content)

I'm not sure if you can nest panels like this or even if it's a good idea. Seems to me the container panel in the master should not be necessary.

Cheers

--Mike

 

 

 
 portal.css
New Post 9/4/2009 9:59 AM
  ZettaCube Support
64 posts
No Ranking


Re: Advice on using nested master pages 
Modified By ZettaCube Support  on 9/4/2009 9:00:33 AM)

Dear Mike,

After looking into your requirements, we believed that the last structure you proposed is necessary.

The hierarchy is indeed a bit complicated and seems unnecessary if we look at a particular page, but the way you factorized the Header out should make the maintenance much easier (and we believed that is exactly what you want).

On the other hand, although the underlying structure might be complex, we believed that the run-time layout performance won't be affected much.

Hope this could answer your question.

 

Cheers

 

 

 
New Post 9/4/2009 10:12 AM
  Mike Thomas
4 posts
No Ranking


Re: Advice on using nested master pages 

 OK, I've tried that but I get the following error:

WebLayoutPanel must exist in a WebLayout.

Which I assume means you cannot nest WebLayoutPanels?

-- Mike

 
Previous Previous
 
Next Disabled
  Forum  Discussions  WebLayout and W...  Advice on using nested master pages
Copyright 2009 by ZettaCube Limited