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?

  • What version of EE? – Jeremy Jan 12 '16 at 18:42
  • It's version 2.9.2 – foamcow Jan 12 '16 at 23:20
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'"}
| improve this answer | |
  • Did you do it that way because the regular categories tags didn't work across MSM sites? – foamcow Jan 12 '16 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 '16 at 1:02
  • In the end I opted for custom queries as described here. – foamcow Jun 14 '16 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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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