3

I have a Multi Site Manager installation with Sites A and B set up.

Site A contains a channel, "Foo" which has a number of category groups assigned to it.

On Site A, I can easily show a list of categories with:

{exp:channel:categories category_group="1" style="linear" show_empty="yes"}
{category_name}<br>
{/exp:channel:categories}

This outputs a list of category names as expected.

I need to do the same on Site B. But using the same code shows nothing. I tried adding a site parameter, a site_id parameter, specifying the channel name, specifying the sitename:channel name. All to no avail.

How can I show the list of categories on Site B?

2
  • What version of EE?
    – Jeremy
    Jan 12, 2016 at 18:42
  • It's version 2.9.2
    – foamcow
    Jan 12, 2016 at 23:20

2 Answers 2

0

I have done it in the past this way:

{exp:query sql="SELECT cat_id, cat_name, cat_url_title FROM exp_categories WHERE group_id = 'xxx'"}
3
  • Did you do it that way because the regular categories tags didn't work across MSM sites?
    – foamcow
    Jan 12, 2016 at 23:13
  • Correct, I was having trouble getting it to work across sites, and needed it done in a hurry......
    – Jim Wyse
    Jan 13, 2016 at 1:02
  • In the end I opted for custom queries as described here.
    – foamcow
    Jun 14, 2016 at 14:40
0

Using the show="category_ids" should work, though that's the individual category ids. Not sure about category groups.

Also, maybe not specific to this, but relaxed_categories="yes" helps with a lot of category indicator URL problems working with MSM.

GWcode Categories may help, as well: http://gwcode.com/add-ons/gwcode-categories

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.