[CLOSED] Is it possible to break this up into a Master Page/Content Page setup?

  1. #1

    [CLOSED] Is it possible to break this up into a Master Page/Content Page setup?

    I am trying to do something but I am not sure if it will work. I want to define a master page that has a panel and then put a placeholder inside the topbar property of the panel so on my content page all I have to do is define the menu items. See my code wish below:

    Master Page Sample:

    
    <ext:Panel ID="Panel1" runat="server" Border="false" Layout="BorderLayout">
                    <Items>
                        <ext:Panel ID="panTopMenu" runat="server" Margins="5" Height="30" Border="false"
                            Header="false" Region="North">
                            <TopBar>
                                <ext:Toolbar ID="Toolbar1" runat="server">
                                    <Items>
                                       <asp:ContentPlaceHolder ID="menuContent" runat="server">
                                        </asp:ContentPlaceHolder>
                                    </Items>
                                </ext:Toolbar>
                            </TopBar>
                        </ext:Panel>
                        <ext:Panel ID="panCenterWrapper" Border="false" runat="server" Margins="0 5 0 5" Header="false"
                            Layout="FitLayout" Region="Center">
                            <Items>
                                <ext:Panel ID="panCenter" runat="server" Padding="5" Header="false" Border="false" >
                                </ext:Panel>
                            </Items>
                        </ext:Panel>
                    </Items>
                </ext:Panel>
    The Content Page:

    
    <asp:Content ID="Content2" ContentPlaceHolderID="menuContent" runat="server">
                                        <ext:Button runat="server" id="cmdDetails" Icon="Package" Text="Details"></ext:Button>
                                        <ext:Button runat="server" id="cmdSourceFile" Icon="Server" Text="Source File"></ext:Button>
                                        <ext:Button runat="server" ID="cmdPrint" Icon="Printer" Text="Print"></ext:Button>
    </asp:Content>
    Thanks,
    Frank
    Last edited by Daniil; Feb 20, 2012 at 1:00 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Yes, this works in you will use Content istead of Items.

    Example 1
    <ext:Toolbar runat="server">
        <Content>
            <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server" />
        </Content>
    </ext:Toolbar>
    Also use a respective layout in a content page:

    Example 2
    <asp:Content runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
        <ext:HBoxLayout runat="server" Align="Middle">
            <BoxItems>
                <ext:BoxItem>
                    <ext:Button runat="server" Text="Button 1" Width="100" />
                </ext:BoxItem>
                <ext:BoxItem>
                    <ext:Button runat="server" Text="Button 2" Width="100" />
                </ext:BoxItem>
            </BoxItems>
        </ext:HBoxLayout>
    </asp:Content>
  3. #3
    Thanks Daniil

    I will try that out.

    Frank
  4. #4
    Hi Daniil,

    So that worked great for the menu but is that any way to do that for other controls like a store?

    I have several similar layouts that i want to handle in a master page and one contains a store like this:

     <ext:Store ID="storeSchools" RemotePaging="true" RemoteSort="true" runat="server"
            OnRefreshData="DoPageAction">
            <Reader>
                <ext:JsonReader IDProperty="SchoolId">
                    <Fields>
                        <ext:RecordField Name="SchoolId" Type="Int" />
                        <ext:RecordField Name="SchoolName" Type="String" />
                        <ext:RecordField Name="IsActive" Type="Boolean" />
                        <ext:RecordField Name="TypeName" Type="String" />
                    </Fields>
                </ext:JsonReader>
            </Reader>
            <AutoLoadParams>
                <ext:Parameter Name="start" Value="0" Mode="Raw" />
                <ext:Parameter Name="limit" Value="30" Mode="Raw" />
            </AutoLoadParams>
            <Proxy>
                <ext:PageProxy AutoDataBind="true">
                </ext:PageProxy>
            </Proxy>
            <BaseParams>
                <ext:Parameter Name="ActionName" Value="RefreshSchools" Mode="Value">
                </ext:Parameter>
            </BaseParams>
        </ext:Store>
    if there any way I can define just the fields markup on the content page?

    <asp:Content ID="Content2" ContentPlaceHolderID="mainContent" runat="server">
     <ext:RecordField Name="SchoolId" Type="Int" />
                        <ext:RecordField Name="SchoolName" Type="String" />
                        <ext:RecordField Name="IsActive" Type="Boolean" />
                        <ext:RecordField Name="TypeName" Type="String" />
    </asp:Content>
    Thanks,

    Frank
  5. #5
    It's not supported to separate inner properties of a control.

    Only a whole control might be separated.

Similar Threads

  1. Replies: 1
    Last Post: Sep 08, 2013, 5:10 AM
  2. Replies: 0
    Last Post: Jul 30, 2012, 10:39 AM
  3. Replies: 2
    Last Post: Feb 29, 2012, 6:26 PM
  4. Replies: 3
    Last Post: Nov 30, 2011, 10:39 AM
  5. Replies: 2
    Last Post: May 05, 2010, 10:23 AM

Tags for this Thread

Posting Permissions