+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Display Event "Contact Name" on Event List View

Display Event "Contact Name" on Event List View

5 posts, 0 answered
  1. AObi
    AObi avatar
    7 posts
    Registered:
    17 May 2010
    17 Jan 2011
    Link to this post
    Hi.

    Please can anyone advise on the steps required to simply make the "Contact_Name" (or any other existing metafield) display on both the Event List view (ListPageMaster.ascx) as well as the Event Details view (ListPageDetail.ascx).

    I have successfully mapped the "external templates" (so that I can control the events layout via 'ListPageMaster.ascx' and 'ListPageDetail.ascx')...

    ...have mapped the "Events Content View Designer" (as detailed: http://www.sitefinity.com/blogs/ivan/posts/09-02-23/mapping_contentviewdesigners_and_working_with_presentation_modes.aspx)
    ...and added a new "sfDesignSettings" to the "MasterSettings" section.

        <sfDesignSettings:TextSetting ID="TextSetting36"
        TargetID="Contact_Name"
        SettingTitle="Contact person details"
        AllowLabelSetting="True"
        AllowFormatSetting="False"
        AllowVisibilitySetting="True"
        TargetVisibleByDefault="True">
        </sfDesignSettings:TextSetting>

    The "Contact Name" is even being displayed as an option (as required) in the ContentView Designer


    HOWEVER, I still cannot seem to get it to actually output onto List view (via the ListPageMaster.ascx) page itself.


    Is there a step that I am missing?


  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    17 Jan 2011
    Link to this post
    Hello AObi,

    In the ListPageMaster template you should have

    <asp:Literal ID="Contact_Name" runat="server" />

    added inside the ItemTemplate of the Repeater control with ID="repeater"

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. AObi
    AObi avatar
    7 posts
    Registered:
    17 May 2010
    17 Jan 2011
    Link to this post
    Yes, I have that...

    <asp:Repeater ID="repeater" runat="server">
     <HeaderTemplate>
            <ol class="sf_eventsList">
        </HeaderTemplate>
        <ItemTemplate>
            <li>
                <h3 class='sf_eventTitle'>
                    <asp:HyperLink ID="fullContent1" runat="server">
                        <asp:Literal ID="Title" runat="server" />
                    </asp:HyperLink>
                </h3>
                <asp:Literal ID="Contact_Name" runat="server" />
                <div id="BasicInfo" runat="server" class="sf_eventBasicInfo">
                    <p class='sf_eventPriod'><asp:Literal ID="Event_Start" runat="server" Text="{0}" /></p>
                    <p class='sf_eventPriod'><asp:Literal ID="Event_End" runat="server" Text="{0}" /></p>
                    <div class='sf_eventSummary'><asp:Literal ID="content" runat="server" Visible="true" />
                    </div>
                </div>.....


    Still nothing being display?
  4. AObi
    AObi avatar
    7 posts
    Registered:
    17 May 2010
    17 Jan 2011
    Link to this post
    Question....

    What actually tells the system that the new "TextSetting36" sfDesignSetting that I've added to the "EventsViewControlDesigner.ascx" ,,,

    <sfDesignSettings:TextSetting ID="TextSetting36"
        TargetID="Contact_Name"
        SettingTitle="Contact person details"
        AllowLabelSetting="True"
        AllowFormatSetting="False"
        AllowVisibilitySetting="True"
        TargetVisibleByDefault="True">
        </sfDesignSettings:TextSetting>

    ...should actually retrieve the "Events.Contact_Name" string data?



    I have the default ...

    <add key="Events.Contact_Name" valueType="ShortText" visible="True" searchable="False" sortable="False" defaultValue="" />

    ,,,entry in the web.config, but how does/should this tie up with new "TextSetting36" sfDesignSetting?

  5. AObi
    AObi avatar
    7 posts
    Registered:
    17 May 2010
    17 Jan 2011
    Link to this post
    Got it working ...

    (Removed mapping to custom "Events Content View Designer" in web.config

    <!--<viewSettings hostType="Telerik.Events.WebControls.Design.EventsViewDesigner" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Events/EventsViewControlDesigner.ascx" />-->

    ... and then added <asp:Literal ID="Contact_Name" runat="server" /> to 'ListPageMaster.ascx' )
Register for webinar
5 posts, 0 answered