1
0
mirror of https://github.com/e107inc/e107.git synced 2025-09-08 21:30:54 +02:00

Menu Template fixes and enhancements. Related News now has a template.

This commit is contained in:
Cameron
2016-03-10 17:32:36 -08:00
parent 51d59f83d9
commit d30135e026
7 changed files with 66 additions and 27 deletions

View File

@@ -32,11 +32,13 @@ class news_related // include plugin-folder in the name.
{
while($row = $sql->fetch())
{
$thumbs = !empty($row['news_thumbnail']) ? explode(",",$row['news_thumbnail']) : array();
$items[] = array(
'title' => varset($row['news_title']),
'url' => e107::getUrl()->create('news/view/item',$row), // '{e_BASE}news.php?extend.'.$row['news_id'],
'body' => varset($row['news_summary']),
'image' => varset($row['news_image'])
'summary' => varset($row['news_summary']),
'image' => $thumbs[0]
);
}

View File

@@ -196,4 +196,12 @@ $NEWS_TEMPLATE['category']['item'] = '
</td></tr>
</table>
</div>
';
';
### Related 'start' - Options: Core 'single' shortcodes including {SETIMAGE}
### Related 'item' - Options: {RELATED_URL} {RELATED_IMAGE} {RELATED_TITLE} {RELATED_SUMMARY}
### Related 'end' - Options: Options: Core 'single' shortcodes including {SETIMAGE}
$NEWS_TEMPLATE['related']['start'] = "<hr><h4>".defset('LAN_RELATED', 'Related')."</h4><ul class='e-related'>";
$NEWS_TEMPLATE['related']['item'] = "<li><a href='{RELATED_URL}'>{RELATED_TITLE}</a></li>";
$NEWS_TEMPLATE['related']['end'] = "</ul>";