Hi
I am trying to move the announcements, as on your profile, to the home page;
It displays the Announcement Control but it says "'Andre has not posted any announcements"
I've made a couple of announcements and I can see them on the Profile page....why aren't they displaying on Home?
this is my code:
<div class="CommonContentBox Highlighted"> <h4 class="CommonContentBoxHeader"> <CSControl:UserData UseAccessingUser="true" runat="server" LinkTo="AnnouncementsRss" style="float: right;"> <ContentTemplate> <CSControl:ThemeImage ImageUrl="~/images/common/feed-icon-12x12.png" BorderWidth="0" runat="server" /> </ContentTemplate> </CSControl:UserData> <CSControl:ResourceControl runat="server" ResourceName="ViewUserProfile_Announcements" /> </h4> <div class="CommonContentBoxContent"> <CSMessage:ProfileMessageList UseAccessingUser="true" runat="server" ShowHeaderFooterOnNone="true"> <QueryOverrides runat="server" QueryType="AnnouncementsForCurrentUser" PageSize="5" PagerID="AnnouncementsPager" /> <HeaderTemplate> <ul class="CommonContentBoxList"> </HeaderTemplate> <ItemTemplate> <CSMessage:ProfileMessageData UseAccessingUser="true" runat="server" Property="DateCreated" Tag="Li" CssClass="Header" FormatString="MMMM dd, yyyy"> <DisplayConditions><CSControl:CustomCondition CustomResult='<%# ShowDateHeader("Announcements", Eval("DateCreated")) %>' runat="server" /></DisplayConditions> </CSMessage:ProfileMessageData> <li> <div class="CommonMessageActions"> <CSMessage:ProfileMessageData UseAccessingUser="true" runat="server" ResourceName="Edit" LinkTo="Edit"> <TrailerTemplate> | </TrailerTemplate> </CSMessage:ProfileMessageData> <CSMessage:DeleteProfileMessageForm UseAccessingUser="true" runat="server" DeleteButtonId="DeleteAnnouncement"> <SuccessActions><CSControl:GoToModifiedUrlAction runat="server" /></SuccessActions> <FormTemplate><asp:LinkButton runat="server" id="DeleteAnnouncement" Text="Delete" /></FormTemplate> </CSMessage:DeleteProfileMessageForm> </div> <div class="CommonMessageHeader"> <CSMessage:ProfileMessageData UseAccessingUser="true" runat="server" Property="Subject" Tag="Strong" /> </div> <CSMessage:ProfileMessageData UseAccessingUser="true" runat="server" Property="Body" Tag="Div" /> </li> </ItemTemplate> <NoneTemplate><CSControl:UserData UseAccessingUser="true" runat="server" Property="DisplayName" ResourceName="ViewUserProfile_NoAnnouncements" /> <CSControl:UserData LinkTo="AddAnnouncement" ResourceName="ViewUserProfile_AddAnnouncement" runat="server" Tag="P" /></NoneTemplate> <FooterTemplate> </ul> </FooterTemplate> </CSMessage:ProfileMessageList> </div> <CSControl:PostbackPager UseAccessingUser="true" runat="server" ID="AnnouncementsPager" ShowFirst="false" ShowLast="false" ShowPrevious="false" ShowIndividualPages="false" ShowNext="True" ShowTotalSummary="false" Tag="Div" CssClass="CommonContentBoxFooter"> <NextLinkTemplate><CSControl:UserData LinkTo="Announcements" runat="server" ResourceName="ViewMore" /></NextLinkTemplate> </CSControl:PostbackPager> </div>
You need to change the query overrides on the announcement list control:
<QueryOverrides runat="server" QueryType="AnnouncementsForAccessingUser" PageSize="5" PagerID="AnnouncementsPager" />
*bump*
I still can't figure this out...It is displaying the Announcement box but it says that there is no announcements? Any help?
Thanks
Thank you very much...
Hi,
I need something very similar, except I would like to display all the announcements from all the users on the page.
Is there a QueryType="AnnouncementsForAllUsers" ?
Is this possible at all with CS controls or do I have to use the API to code something myself?
Thanks!
Copyright© 2008 Telligent Systems Inc. All rights reserved CommunityServer.com • Telligent.com