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.

In MSM, how to get site info for _other_ sites?

October 04, 2011 12:16pm

Subscribe [2]
  • #1 / Oct 04, 2011 12:16pm

    Hoosteeno

    109 posts

    I’d like to link from some MSM site’s template to to other sites in the MSM—their front pages, for example. The below would be super:

    <a href="http://{site_url">{site_label site='{some_other_msm_site}'}</a>

    But it looks like the only way to get the content I need is to use the query module, maybe even php, and piece it together myself. Is that correct?

    Thanks!

  • #2 / Oct 04, 2011 12:48pm

    Hoosteeno

    109 posts

    While my question still stands—i.e. “Is there a better way to do this?”—I have the php/query code working. Kind of sloppy; I’m hoping there’s a better way! 😊

    #php on output, natch
    {exp:query sql="SELECT es.site_name AS sn, es.site_label AS sl, es.site_description AS sd, es.site_system_preferences AS sp FROM exp_sites es"}
     <?php
      $site_data = unserialize(base64_decode("{sp}"));
     ?>
     <li><a href="http://&lt?="> ?>"]{sl}</a></li>
    {/exp:query}

     

  • #3 / Oct 05, 2011 7:10am

    Sue Crocker

    26054 posts

    I don’t know of another method, especially since some of the info is encoded. You could always make this into a plugin..

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

ExpressionEngine News!

#eecms, #events, #releases