1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-26 15:54:43 +02:00

{BOOK_CHAPTERS} shprtcode added.

Render All visible Chapters from a specific Book.
Uses "listChapter" template key. ie. $CHAPTER_TEMPLATE[---TEMPLATE --]['listChapters']
Example {BOOK_CHAPTERS: name=book-sef-url&template=xxxxx&limit=3}
This commit is contained in:
Cameron
2017-11-10 15:37:23 -08:00
parent 2a37288dc7
commit e165c90575
3 changed files with 89 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ class cpage_shortcodes extends e_shortcode
// Grab all book/chapter data.
function __construct()
{
parent::__construct();
$books = e107::getDb()->retrieve("SELECT * FROM #page_chapters ORDER BY chapter_id ASC" , true);

View File

@@ -123,4 +123,14 @@ $CHAPTER_TEMPLATE['panel']['listPages']['start'] = "{CHAPTER_BREADCRUMB}<div
$CHAPTER_TEMPLATE['panel']['listPages']['item'] = "<div class='section'><div class='row'>{CPAGEMENU}</div></div>";
$CHAPTER_TEMPLATE['panel']['listPages']['end'] = "</div>";
$CHAPTER_TEMPLATE['grid']['listChapters']['start'] = "{SETIMAGE: w=450}<div class='row'>";
$CHAPTER_TEMPLATE['grid']['listChapters']['item'] = "<div class='col-xs-12 col-md-4 text-center'>
{CHAPTER_IMAGE}
<h2><a href='{CHAPTER_URL}' >{CHAPTER_NAME}</a></h2><p>{CHAPTER_DESCRIPTION}</p><p>{CHAPTER_BUTTON}</p></div>";
$CHAPTER_TEMPLATE['grid']['listChapters']['end'] = "</div>";
?>