Help get this topic noticed by sharing it on Twitter, Facebook, or email.
I’m unsure

Activity Feed and the Multisite Module

I have this on a site that is part of a multisite installation. Content from All sites is listed in the feed. How do you limit the weblog type to just one site in an MSM install?
1 person has
this question
+1
Reply
  • Just to clarify, are you wanting to display content from all weblogs/channels within a specific site? We've been wanting to add in some Multiple Site Manager support, but have not had time yet. Is a viable workaround to add in the names of the weblogs you want to include in the tag?

    Thanks,

    Doug
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • yes, that is what I did. Only now I'm trying to apply some weblog specific markup. Is this possible?

    For example, I have my activity feed tag like such:

    <ul>
    {exp:activity_feed:feed type="weblogs" limit="40" weblog="one|two|three"}
    <li>
    <a href="/community-life/member-directory/{actor_member_id}/">{actor_screen_name}</a> {action}
    {if type == "weblog_entries"}
    <a href="/blogs/post/{url_title}">{item_title}</a> in the {parent_title} section.
    {/if}
    {if type == "weblog_comments"}
    {parent_reference} <a href="/blogs/post/{parent_url_title}/#comment-{item_id}"> {parent_title} </a>
    {/if}
    </li>

    {/exp:activity_feed:feed}
    </ul>


    However the links to the entries and comments are from structure and different for each weblog. I tried this:

    <ul>
    {exp:activity_feed:feed type="weblogs" limit="40" weblog="one|two|three"}
    <li>
    <a href="/community-life/member-directory/{actor_member_id}/">{actor_screen_name}</a> {action}
    {if weblog == "one"}
    <a href="/one/post/{url_title}">{item_title}</a> in the {parent_title} section.
    {/if}
    {if weblog == "two"}
    <a href="/two/post/{url_title}">{item_title}</a> in the {parent_title} section.
    {/if}
    {if type == "weblog_comments"}
    {parent_reference} <a href="/blogs/post/{parent_url_title}/#comment-{item_id}"> {parent_title} </a>
    {/if}
    </li>

    {/exp:activity_feed:feed}
    </ul>


    and when I do that the entry data does not show up, its like using the weblog if statements break the module.

    Is there a way to display different url paths based on weblog?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • Hi Doug -

    I believe you can solve this by using the "parent_url_title" and "grandparent_url_title" variables like this:


    {exp:activity_feed:feed type="weblogs" limit="40" weblog="one|two|three"}

    {actor_screen_name} {action}
    {if parent_url_title == "one" OR grandparent_url_title == "one"}
    {item_title} in the {parent_title} section.
    {/if}
    {if parent_url_title == "two" OR grandparent_url_title == "two"}
    {item_title} in the {parent_title} section.
    {/if}
    {if type == "weblog_comments"}
    {parent_reference} {parent_title}
    {/if}

    {/exp:activity_feed:feed}


    When you are displaying weblog entries, the parent_url_title variable contains the blog name. When you are displaying weblog comments, the grandparent_url_title variable contains the blog name.

    Not sure exactly what is going in each of your weblogs, so you might need to do the {if...} statements a bit differently than I have it -- just trying to illustrate how those can be used.

    Hope that helps!

    Regards,

    Doug
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated