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 site_short_name or other variable to show which site it belongs to

August 31, 2010 2:12pm

Subscribe [4]
  • #1 / Aug 31, 2010 2:12pm

    Emily Heath

    197 posts

    Hello,
    I want to list entries from 2 of my sites in one listing, but I want to ‘label’ them according to which site they belong to. I was hoping to use the {site_short_name} variable for this, but it looks like it only shows which site templates you are looking at, as opposed to which site that particular entry belongs to. Is that correct? I’m guessing that this is because it is a global variable (as set in the path.php file).

    So is there no (other) way I can get the name of which site an entry belongs to?

    Thanks.

  • #2 / Aug 31, 2010 9:32pm

    Brandon Jones

    5500 posts

    Hi Emily,

    I’d suggest using the entry_site_id variable, as those are less prone to change. Does that help?

  • #3 / Sep 08, 2010 5:30am

    Emily Heath

    197 posts

    Thank-you so much Brandon, I knew there was something like that out there! I’m thinking this might be quite a useful variable to point out in the Notes on the MSM docs page about site variables http://ellislab.com/expressionengine/user-guide/cp/sites/code.html (that’s where I’d been looking for it). What do you think?

  • #4 / Sep 08, 2010 9:58am

    Sue Crocker

    26054 posts

    Emily, have you tried adding to the docs? You should be able to add a comment there.

  • #5 / Sep 08, 2010 11:05am

    Emily Heath

    197 posts

    Haven’t tried yet, but I will do, thanks Sue.

  • #6 / Sep 08, 2010 4:15pm

    Ingmar

    29245 posts

    Very good. Just keep us in the loop, please, we’ll be here.

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

ExpressionEngine News!

#eecms, #events, #releases