demo

general Overview

pw_localaudiofiles_mindmap.png

This image shows a MindMap of the DB-structure and it controls.

The DB extends the ProcessWire variable $page with some additions. These additions depend of the type (or path) of the $page. In fact, the template name also reflect the path/type.

So, if the $page->template is album, the $page has following additions:

There are other additions like totalPlaytime, totalPlaytimeString, playlistM3u, playlistPls, but the above ones, reflecting the logical parent-child-relations are of more interest. Here are the summary for all four page types:

For the other additions please look into the DB, they are displayed as PageInfo on every single page, together with some simple demo code. The code you find in the Templatefiles local-audio-files_single.php and local-audio-files.php.

The $page variable together with the LocalAudioFiles-FrontEndHandler gives you comprehensive tools to work with your music collection.

For example, the FrontEndHandler ($fe) provides fully customizable FormSelectFields. You can call them like $fe->getFormSelect('album') or $fe->getFormSelect('artists'), whereas if you use genre, artist, album - you get a SingleSelectField, if you use the plural, genres, artists, albums you get a MultiSelectField!

For more examples please refer to the demos section of the DB.