ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

MSM shared channel

February 08, 2011 5:49am

Subscribe [2]
  • #1 / Feb 08, 2011 5:49am

    purple-agency

    11 posts

    Ok, MSM is not bad, however I want to have one news channel across both sites. No problem my template simply references site 1 and displays the content. However one of the custom fields specifies which site to display the content on (Both, site 1, site 2). The template calls this

    {exp:channel:entries channel="news" orderby"date" limit="15" site="site1" search:news_site="=1" dynamic="no" cache="no"}

    and works fine on site one, but not on site two. This is because the mod.channel.php function looks for custom fields on the current site (site2) not the site1 as specified in the template. Therefore the search field is not found and displays all results.

    If I create a second channel on the second site I’m still having similar issues, however I’d rather only have one channel so as to keep the data together.

    Comments, ideas, fixes welcome 😊

  • #2 / Feb 08, 2011 6:20am

    Neil Evans

    1403 posts

    if that is the case then it seems to be a bug.
    A solution, that i know works as i am using it on a MSM site is to use categories. Then in theory each MSM site has a news category, and of course this allows you to place this article in multiple categories (getting rid of your both scenario). Then you just refine the results on the lower site by using category parameter.

    The only down side… your using EE categories, and if you search the forum you will see plenty of issues people are having with these (sort orders, menu outputting, etc - although some of these might be fixed since i last read up).

  • #3 / Feb 08, 2011 6:32am

    purple-agency

    11 posts

    Can’t use categories :( as only certain groups can post on certain sites so need to limit it (Wrote a custom field type to do this). Thanks for the input though… (I can’t limit category access on usergroup can I?)

  • #4 / Feb 08, 2011 3:41pm

    Sue Crocker

    26054 posts

    No, you can only limit channels. What is news_site?

  • #5 / Feb 08, 2011 4:28pm

    Neil Evans

    1403 posts

    well if your able to write field types, then i might suggest you are able to load categories and restrict them by usergroup and display in your own field type too. I cannot see any reason why you cannot effectively have your own field type to do this - if you are able from PHP/CI/EE code.

  • #6 / Feb 08, 2011 5:50pm

    Lisa Wess

    20502 posts

    Just to clarify what is occurring here - site= and the search: parameter unfortunately do not work together. The search: parameter works only on the current site.  You would need a custom query or other custom solution to get this combination of data.

  • #7 / Feb 09, 2011 4:52am

    purple-agency

    11 posts

    Just to clarify what is occurring here - site= and the search: parameter unfortunately do not work together. The search: parameter works only on the current site.  You would need a custom query or other custom solution to get this combination of data.

    So this is a limitation not a bug. I’ve written code to limit editing and creation of articles now based on user groups and categories… not fully working but 90% there.

  • #8 / Feb 09, 2011 5:07am

    Neil Evans

    1403 posts

    Without knowing exactly what your doing, it is hard to say. But you should not need to write code to limit certain user groups to creating and editing a specific channel - that can be done from the member groups settings.

    Your field should only need to control which categories are available to which member groups?
    Or have i missed the point of what you are doing?

  • #9 / Feb 09, 2011 4:17pm

    Ingmar

    29245 posts

    So, does that clear the matter up for you, purple agency? Please let us know if there’s anything else we can do for you.

  • #10 / Feb 10, 2011 5:01am

    purple-agency

    11 posts

    The search: parameter works only on the current site.

    That clears up my initial query, but EE MSM would be SOOOO much more powerful if there was an option to share a SINGLE channel across multiple sites 😊 For now I’ve written a hook to limit access to users depening on the category in the channel (e.g. a channel has two categories site a / site b) And group A can only edit/add content to category A, otherwise they get an error.

  • #11 / Feb 10, 2011 10:40am

    Sue Crocker

    26054 posts

    You might want to consider a Feature Request. As my husband used to say.. “Send code.” 😊 Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases