MSM Site List Custom Field

Developer

Christopher Imrie

3rd Party (Free)


EE Version Support

  • ExpressionEngine 2

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Fieldtype

Tags

EE 2.0 drop down list custom field of all your ExpressionEngine sites being run by the Multiple Site Manager. The fieldtype also lets you choose what information to be ouput in your templates such as Site ID, Site Short Name or Site Label

ft.cki_sitelist.php

This is an EE2.0 custom field type that will add a drop down list of all your ExpressionEngine sites being run by the Multiple Site Manager

Info

Developed by Christopher Imrie, http://www.christopherimrie.com
License: http://creativecommons.org/licenses/by-sa/3.0/

Requirements

     
  • ExpressionEngine 2.0

Installation

     
  • Copy ft.cki_sitelist.php to your system/expressionengine/fieldtypes/ folder.
  •  
  • Select CKI Site List as the field type when creating a new custom field type

How to use

The field type supports single tags only.  Use the tag on its own to return the selected site short_name_

Simple Example

Lets say you have defined a custom field with a field label of Site list and field name site_list and through the publish form selected a site with an short_name of “default_site”.  You can produce the site short name of the selected site by simply calling the field name tag on its own:

    
        {exp:channel:entries channel="blog"}
            <p>You selected site short name is {site_list}</p>
        {/exp:channel:entries}
    

Returns:


<p>You selected site short name is default_site</p>

Parameter Example

Using the same site you have selected in the above example, we can retrieve different site attributes by using the display parameter:

    
        {exp:channel:entries channel="blog"}
            <p>You selected site ID is {site_list display="id"}</p>

        {/exp:channel:entries}
    

Returns:


<p>You selected site ID is 1</p>

Parameters

Display
    display="label"

Allows you to specify what site attribute to return.  This parameter is optional, and if not used, the tag will return the site short name by default.

Accepts the following variables:

     
  • id – Return the site id
  •  
  • label – Returns the site label
  •  
  • short_name – Returns the site short name
  •  
  • description – Returns the site description

Changelog

1.0

     
  • Initial Commit

MSM Site List Custom Field Links

This entry was created December 15, 2009, 11:43 am.
This entry was last updated July 12, 2010, 4:53 pm.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

There are no reviews for this add-on yet.

What are you waiting for? Rate it and review it!