Skip to content
Sitemason - Build on Us

Sitemason Blog

Developer Tips: Custom Navigation

No matter how helpful Sitemason Library methods are, sometimes you gotta go custom. One common requirement is to break out from basic navigation menus to customize the display of a site's navigation. A simple example below:

One Level Navigation

<ul>
<?php
    foreach ($content_xml->nav as $nav) { 
        echo '<li';
        if ($nav->currently_displayed || $nav->current_site) {
            echo ' class="active"';
        }
        echo '><a href="' . $nav->link . '">' . $nav->title . '</a></li>'; 
    }
?>
</ul>

Read on for more examples of customizing navigation with PHP

Developer Tips: Custom Queries for Live Testing

Today we're launching a new series for developers to regularly offer tips and tricks for developing in the Sitemason environment. Our first tip is to use custom queries for testing code on a live site. 

One thing that is very different for developers working on the Sitemason platform for the first time is developing in a live production environment. Read more to learn about a great way to easily switch between test and production code. 

Sitemason HTML5 Boilerplate Template

For those interested in developing websites on the Sitemason CMS platform, your starting off point just got a whole lot cooler. 

Inspired by the work being done at html5boilerplate.com, Sitemason beefed up their own boilerplate adding lots ofHTML5 goodness and bunches of new Sitemason PHP Library methods. 

Go checkout the boilerplate!

For more info, read up on the improvements that were made to the PHP Library in the Sitemason Developers Group.

PHP Templates get printRelatedArticles();

 

Today we added a new PHP method to our ever-growing framework. This is a simple way to add related articles for your blog or news feed. The tag-based call by default grabs the 5 most recent articles using tags it detects in the currently viewed article. 

Recent Forum Posts

Warning: file_get_contents(https://sitemason.zendesk.com/forums/279545/entries.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /mnt/files/s/sitemason.com/www/smTemplate/inc/support/zendesk-pull.php on line 11 Warning: usort() expects parameter 1 to be array, null given in /mnt/files/s/sitemason.com/www/smTemplate/inc/support/zendesk-pull.php on line 14 Warning: Invalid argument supplied for foreach() in /mnt/files/s/sitemason.com/www/smTemplate/inc/support/zendesk-pull.php on line 17