Move Announcement to Home page

rated by 0 users
Answered (Verified) This post has 1 verified answer | 5 Replies | 3 Followers

andrevs
Top 75 Contributor
300 Posts
Points 4,390
By: andrevs
Posted: Sun, Apr 27 2008 2:34 PM

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>
 

 
  • Post Points: 20 |

Answered (Verified) Verified Answers

Ben Tiedt
Top 10 Contributor
3,338 Posts
Points 63,065
CS Developers
Answered (Verified) By: Ben Tiedt
Posted: Mon, Apr 28 2008 6:35 PM In reply to

You need to change the query overrides on the announcement list control:

<QueryOverrides runat="server" QueryType="AnnouncementsForAccessingUser" PageSize="5" PagerID="AnnouncementsPager" />

Ben Tiedt's Blog

 
Answered (Verified)
  • Post Points: 35 |

All Replies

andrevs
Top 75 Contributor
300 Posts
Points 4,390
By: andrevs
Posted: Mon, Apr 28 2008 8:09 AM In reply to

 *bump*Wilted Flower

 
  • Post Points: 5 |
andrevs
Top 75 Contributor
300 Posts
Points 4,390
By: andrevs
Posted: Mon, Apr 28 2008 12:57 PM In reply to

 I still can't figure this out...It is displaying the Announcement box but it says that there is no announcements? Any help?

Thanks

 
  • Post Points: 5 |
Ben Tiedt
Top 10 Contributor
3,338 Posts
Points 63,065
CS Developers
Answered (Verified) By: Ben Tiedt
Posted: Mon, Apr 28 2008 6:35 PM In reply to

You need to change the query overrides on the announcement list control:

<QueryOverrides runat="server" QueryType="AnnouncementsForAccessingUser" PageSize="5" PagerID="AnnouncementsPager" />

Ben Tiedt's Blog

 
Answered (Verified)
  • Post Points: 35 |
andrevs
Top 75 Contributor
300 Posts
Points 4,390
By: andrevs
Posted: Tue, Apr 29 2008 1:04 AM In reply to

 Thank you very much...

 
  • Post Points: 5 |
boyan
Not Ranked
8 Posts
Points 100
By: boyan
Posted: Mon, Jun 30 2008 2:10 PM In reply to

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!

 
Page 1 of 1 (6 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com