Stump the Panel » End Users and Information Workers

Share Annoucement from main site with sub sites (filtered)

(18 posts)
  • Started 3 days ago by illegal operation
  • Latest reply from bensch
  1. illegal operation
    Member

    Hi,

    I'm hoping someone knows how to do this.

    We have an annoucement list on our main site, and what we would like to do is share the annoucements with sub sites.

    So what I did so far was use the content query web part, and was able to display the main list in the sub site.

    But next, what we would like to do is have only certain annoucements appear in the sub sites pages. I was thinking I could create a column in the main list, that the user could check if they want it to show in the sub site too.

    But I'm not sure how to filter the list within the sub site to look at that column. Is there a way to do this? Or another method to do this?

    Posted 3 days ago #
  2. illegal operation
    Member

    I don't see a way to edit my post, but I need to change the request.

    What we would really like to do is this,

    Have an announcement list in our main site, and also a annoucement list in our sub site.
    What we would like to do is make it so, sometimes the annoucements in the sub site lists should appear in the main site list.

    Is there a way to either export an annoucement from the sub site list to the main site announcement list? Or a way for the main list, to look for a flag or somesort of marker in the sub sites lists and get any that are marked?

    Posted 3 days ago #
  3. gmaass
    Member

    This is what Content Editor Web Parts are designed to do.

    It is important to remember that Sharepoint is at its core a database, so the concept of "exporting" so that something appears in more than one place does not apply. You should never be in the position of having more than one instance of any entity- you can make one entity appear in multiple places. Content Editor Web Part essentially allows you to query the content database for any content type that meets a specific criteria- for example, any announcement from Site X that has Column Y marked as true.

    We use this to aggregate announcements flagged as "general interest" from all of our department sites to our main portal page

    Posted 3 days ago #
  4. @gmaass: you mean Content Query Web Part...

    Posted 3 days ago #
  5. illegal operation
    Member

    Thanks for replying,

    Ya, after I posted that, I thought export was not what I wanted to do.

    I've added the Content Editor webpart to a page, now where do I have the options to query?

    I only see the Rich text editor button, and Source editor.

    Or did you mean the content Query webpart?

    Posted 3 days ago #
  6. illegal operation
    Member

    [quote]@gmaass: you mean Content Query Web Part... [/quote]

    Thanks, I had a feeling that's what he meant, but just wanted to make sure.

    So I have the content query part on a page, and I have it set to show annoucements from the main site, and it's including all the annoucements for the sub sites. But how do I filter for it to only show certain announcements from each department, when the requirement is met?

    Posted 3 days ago #
  7. illegal operation
    Member

    I've got the content query on the page, but under filter there is a dropdown of all these different items, but the field I want to filter on isn't there.

    Is that where I should be looking?
    or is there somewhere else I need to go?

    Posted 3 days ago #
  8. gmaass
    Member

    Oops, yep, Content Query Web Part...

    Posted 3 days ago #
  9. gmaass
    Member

    Content Query web part can only filter on Site Columns, so if you just added a column to your list, you will need to create a site column (or, for long term maintainability, create a content type and have it use your site columns).

    Posted 3 days ago #
  10. illegal operation
    Member

    Thanks, I've added the site column and now see it listed in the content query.

    So the field I have, is a yes/no box.
    In the filter I set it to display where 'flag' equals=1

    but nothing is appearing, a yes/no field is 1/0 right?

    I also tried using Yes, and it didn't work either.

    Posted 3 days ago #
  11. illegal operation
    Member

    This is wierd,

    So if I create a view on either of those lists, and then under the filter area 'flag' equals 1

    it works for that list, but if I got to the content query and do the same thing. It doesn't work, returns no results no matter what I put in that field.

    Is there something different for the content query that needs to be done to filter a yes/no field?

    Posted 3 days ago #
  12. illegal operation
    Member

    Anyone have any ideas why the filter doesn't work within the content query webpart, but does work in a custom view?

    I'm so close to having this done, but can't get the filter to work :(

    Posted 2 days ago #
  13. illegal operation
    Member

    I'm not sure what I'm doing wrong, here is what I've done.

    1. Created an annoucement list in the main site. (Added a column 'flag' yes/no)
    2. Created an annoucement list in the sub site. (Added a column 'flag' yes/no)
    3. Created a new site column to include 'flag'
    4. Created a new page, added the content query web part.
    5. Configured the web part to look at all annoucement lists starting with the main site and all sub sites.
    6. Added a filter in the content query web part, saying if 'flag' equals 1

    Is this correct? Right now as soon as I put anything in the filter area (1 or 0) it stops working and displays nothing on the page.

    Posted 2 days ago #
  14. illegal operation
    Member

    Does anyone have an idea to what I could have done wrong?

    Posted 9 hours ago #
  15. illegal operation
    Member

    Did I stump the panel :)
    What do I win!!!

    It really seems like it should work tho, but for some reason the filter won't work within the content query, always no records when I try and use it on my flag field.

    I posted my steps above, does anyone see anything I may have missed?

    Posted 4 hours ago #
  16. bensch
    Member

    Hi

    I'd do the following - (NB. you must set up the site column first then add that column to your lists using the 'Add from existing site columns option')

    1] Set up your site column at the top level of your site collection as a choice type with values Yes + No as radio buttons (the default yes/no checkbox field type is not my fave)

    2] Add your site column to your lists (or better still content type - this is another discussion though) and ensure that you update some announcements to Broadcast* [or whatever your column name is] =Yes

    3] Add a content query web part to your web part pages and set the query to display

    -----> Show all items from all sites in this site collection
    -----> Show items from this list type: Announcements
    -----> Show items of this content type: <All Content Types>
    -----> Additional Filters: Show items when: Broadcast* - is equal to - Yes
    -----> And: Expires is greater than or equal to [Today] === this is optional, it will stop old announcements appearing though.

    Good luck!

    Cheers
    Ben

    Posted 3 hours ago #
  17. illegal operation
    Member

    Thank You!
    That did it!

    I had originally added the columns to my list before i created the site column. So I didn't use the 'Add from existing site columns option'. It all makes sense now!

    Now I need to figure out how to get a summary of the announcements on the page. The first so many words or something.

    Posted 2 hours ago #
  18. bensch
    Member

    Cool!

    Now you're talking ... it's a bit involved but is totally doable.

    I would start here if I were you:

    http://www.heathersolomon.com/blog/articles/CustomItemStyle.aspx

    http://blogs.msdn.com/ecm/archive/2006/10/25/configuring-and-customizing-the-content-query-web-part.aspx

    http://blogs.sharepointguys.com/brendon/sharepoint-2007/programming/connecting-the-cqwp-without-changing-itemstyle-xsl/

    I have used that info to create exactly what you described re. summaries.

    Cheers
    Ben

    Posted 2 hours ago #

RSS feed for this topic

Reply

You must log in to post.