Music Overview

by Justin Bodeutsch | Last edited: 11/8/2010

Adding Music to a site is a very simple, yet fully customizable process.

Defaults

By default, the music module will use the global music monklet to display content on your site. A list of playlists will be available at

http://www.example.com/playlists

A list of all songs is found at:

http://www.example.com/songs

It's not advised to rely on the global monklet to display content. The monklet can change at any time and may render undesirable results.

Customizing

Monklet

You can copy the default global monklet and make changes as needed. See the API reference for a complete list of tags and parameters. After you save your monklet, go to the settings tab under music and choose the monklet for the list.

Template

The template used can also be updated at any time. Simply add a new template to the system (you won't need to enable it for any modules), then head to the music settings page and choose it from the list.

Location

You can change the location of either the playlist list or the songs list by creating a new nav item and pointing it at the predefined option 'playlists' or 'songs'. Afterwards, your lists will be found at those nav items and not at /playlists/ or /songs/.

Sidebar

In the sidebar you can create a dropdown that will take the user to lists of content grouped by certain options.

{{
tag="music"
display="selector"
select="__performer__ __composer__ __category__ __all__"

You can also show lists of performers / composers / categories linking to their content.

{{
tag="music"
display="list"
groupby="category"

 

Examples

Here are some common uses of the music module to help you get going:

This will display the most recent two playlists along with each song in each playlist.

getContent(
    "music",
    "display:auto",
    "include_songs:yes",
    "order:title",
    "howmany_playlist:2",
    "show_playlist:<h2>__listtitle__</h2>",
    "show_songs:<h3>__title__</h3>",
    "show_songs:<p>__date format='M-Y'__</p>",
    "show_songs:<p>Composer: __composer__</p>",
    "show_songs:<p>Performer: __performer__</p>"
 );

A list of songs in a specified playlist:

getContent(
    "music",
    "display:list",
    "playlist:playlist-slug",
    "before_show_songs:<h2>__listtitle__</h2>",
    "show_songs:<h3>__title__</h3>",
    "show_songs:<p>Composer: __composer__</p>",
    "show_songs:<p>Performer: __performer__</p>"
   );

A list of recently added songs:

  getContent(
    "music",
    "display:list",
    "playlist:all",
    "order:recent",
    "show_songs:<h3>__title__</h3>",
    "show_songs:<p>Composer: __composer__</p>",
    "show_songs:<p>Performer: __performer__</p>"
   );

The defualt monklet. Displays playlist list, song list, or song detail depending on the URL.

tag="music"
display="auto"

before_show_playlist="__headerdescription__"

no_show_playlist="No Playlists could be found."

show_playlist="<h3>__listtitle__</h3>"
show_playlist="__listtitlelink__"
show_playlist="<p>Category: __listcategorylinks__</p>"
show_playlist="<p>__listdescription__</p>"

before_show_songs="<p>__headerdescription__</p>"
before_show_songs="<h3>__listtitle__</h3>"
before_show_songs="__listtitlelink__"
before_show_songs="<p>Category: __listcategorylinks__</p>"
before_show_songs="<p>__listdescription__</p>"

no_show_songs="<p>No songs could be found.</p>"

group_show_songs="<h1>__type__: __title__<h1>"

show_songs="<h2>__title__</h2>"
show_songs="<p>__date format='M-Y'__</p>"
show_songs="<p>__titlelink__</p>"
show_songs="<p>__description__</p>"
show_songs="<p>__keywords__</p>"
show_songs="<p>Performer: __performer__</p>"
show_songs="<p>Composer: __composer__</p>"
show_songs="<p>Image: __image__</p>"
show_songs="<p>Image Thumb: __imageTMB__</p>"
show_songs="<p>Lyrics: __lyrics__</p>"
show_songs="<p>Sheet Music: __songsheet__</p>"
show_songs="<p>Audio: <a href='__audio__'>__audio__</a></p>"
show_songs="<p>Audio Player: __audioplayer__</p>"
show_songs="<p>Video: __video__</p>"
show_songs="<p>Video Player: __videoplayer__</p>"

no_show_detail="I can't find this song!!"

before_show_detail="<h3>__listtitle__</h3>"
before_show_detail="__listtitlelink__"
before_show_detail="<p>Category:__listcategorylinks__</p>"
before_show_detail="<p>__listdescription__</p>"
show_detail="<h4>__title__</h4>"
show_detail="<p>__date format='M-Y'__</p>"
show_detail="<p>__description__</p>"
show_detail="<p>__keywords__</p>"
show_detail="<p>Artist: __performer__</p>"
show_detail="<p>Composer: __composer__</p>"
show_detail="<p>Image: __image__</p>"
show_detail="<p>Image Thumb: __imageTMB__</p>"
show_detail="<p>Lyrics: __lyrics__</p>"
show_detail="<p>Sheet Music: __songsheet__</p>"
show_detail="<p>Audio: <a href='__audio__'>__audio__</a></p>"
show_detail="<p>Audio Player: __audioplayer__</p>"
show_detail="<p>Video: __video__</p>"
show_detail="<p>Video Player: __videoplayer__</p>"