Skip to content

Instantly share code, notes, and snippets.

@joeworkman
joeworkman / total-cms-blog-category-menu.php
Last active November 16, 2018 23:27
This will create menu items for every category in a Total CMS blog. You can place this snippet in any Foundation menu stack that supports custom HTML menus
<li class='has-dropdown'><a href='#'>Categories</a><ul class='dropdown'>
<?php
$cmsid = "blog";
$attribute = "category"; // tag, category, author
$href = "/blog/?category="; // URL to blog list with category filter
//-----------------------------------------------
// Do not modify below this line
//-----------------------------------------------
if ($publish) {
@joeworkman
joeworkman / total-cms-blog-menu.php
Last active February 5, 2019 20:52
This will create menu items for all blog posts inside Total CMS. You can place this snippet inside of any Foundation menu stack that supports custom HTML menus.
<li class='has-dropdown'><a href='#'>Blog</a><ul class='dropdown'>
<?php
$cmsid = "blog";
//-----------------------------------------------
// Do not modify below this line
//-----------------------------------------------
if ($publish) {
$totalblog = new \TotalCMS\Component\Blog($cmsid);
$posts = $totalblog->filter_posts();