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.

Get category URLs from MSM sites

August 31, 2011 7:35am

Subscribe [3]
  • #1 / Aug 31, 2011 7:35am

    Dragan Simonovic

    71 posts

    Hello,

    I have a home page where I pull content from 6 other sites managed via MSM. On that page there is a box Latest news with news pulled from 6 websites. Each news is assigned to a few categories.

    How to pull site and categories URL for each specific news?

    When I use {categories} tag it only pulls {category_url_title} from default site because home page is actually default website..

  • #2 / Aug 31, 2011 6:32pm

    Kevin Smith

    4784 posts

    Hi Vibrant Drive,

    Are you already using the site=”” parameter in your Channel Entries tag? If so, is the problem you’re having then that entries pulled in from other sites aren’t displaying categories when using the categories variable pair?

  • #3 / Sep 01, 2011 5:00am

    Dragan Simonovic

    71 posts

    I’m using site parameter within channel tag.

    The problem is because a single entry is posted into multiple categories, say 3 different categories, and {categories} produces 3 {category_url_title} for a single entry. That means I have 3 different URLs for a single entry.

    So I need to detect primary category somehow so each entry has a single URL.

    How to achieve this?

  • #4 / Sep 01, 2011 10:52pm

    Dan Decker

    7338 posts

    Vibrant Drive,

    Have you tried using the limit parameter in your {categories} tag pair?

    {categories limit="1"}
      {category_url_title}
     {/categories}

    Let us know if you have any further questions.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases