Albums CMS Design Principles: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 1: | Line 1: | ||
[[Category:CMS Documentation]] [[Category:Albums CMS]] [[Category:Littled Libraries]] [[Category:jQuery/AJAX]] [[Category:Web Development]] | |||
== AJAX == | == AJAX == | ||
When adding a new album-based CMS section, the following files may need to be updated with the new content type: | When adding a new album-based CMS section, the following files may need to be updated with the new content type: | ||
| Line 9: | Line 12: | ||
== PHP Classes == | == PHP Classes == | ||
Classes derived from <code>album_class</code> and <code>album_xpost_class</code> that don’t have the same columns as those tables should set the <code>db_field property</code> value for those fields to FALSE in their class constructors. | Classes derived from <code>album_class</code> and <code>album_xpost_class</code> that don’t have the same columns as those tables should set the <code>db_field property</code> value for those fields to FALSE in their class constructors. | ||
<syntaxhighlight lang="php" highlight="4"> | <syntaxhighlight lang="php" highlight="4"> | ||
| Line 18: | Line 22: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==Listings== | == Listings == | ||
=== JavaScript/JQuery handlers === | === JavaScript/JQuery handlers === | ||
| Line 42: | Line 47: | ||
* [[Gallery Listings|Album/Gallery Listings]] | * [[Gallery Listings|Album/Gallery Listings]] | ||
* [http://littledamien.com/docs/?p=636|littledamien.com: albums cms specs & principles] (Littledamien docs) | * [http://littledamien.com/docs/?p=636|littledamien.com: albums cms specs & principles] (Littledamien docs) | ||
Revision as of 17:20, 11 September 2014
AJAX
When adding a new album-based CMS section, the following files may need to be updated with the new content type:
/_classes/content/cache_class.php /_classes/content/resort_class.php
Obviously if a file includes the cache_class then the new content type will be available to that file.
PHP Classes
Classes derived from album_class and album_xpost_class that don’t have the same columns as those tables should set the db_field property value for those fields to FALSE in their class constructors.
function __construct() {
parent::__construct();
/* any child class property initialization would go here */
$this->layout->db_field = false;
}
Listings
JavaScript/JQuery handlers
The JavaScript in this section is deprecated and needs to be updated.
LITTLED.Gallery.bindAlbumListingsHandlers()
The routine above doesn’t handle content refreshes. The code below adds that, along with some filtering utilities. This can be rolled up into a routine available through the littled cms library.
LITTLED.init({ setSortables: LITTLED.Gallery.bindAlbumListingsHandlers });
LITTLED.Gallery.keywordAutocomplete();
LITTLED.setSortables();
$('.datepicker').datepicker();
$('.update-cache').on('click', {my: 'local options'}, $.littled.updateCache);
See Also
- Album/Gallery Listings
- albums cms specs & principles (Littledamien docs)