Category Archives: Frameworks

Adding a Site-Map Page in LightCMS

I have not found functionality to-date in LightCMS where a site map can be printed to the main content area of a page. Most site maps that are developed for people to read (as opposed to XML maps that are designed for search spiders) simply print an unordered list to the body are of a page and then link to it within the site’s footer area.

The easiest method for accomplishing this in LightCMS that have found is to:

1) Create a new template (call it “Site-Map.html”) and template icon (call it “Site-Map.html.gif”).

2) Add the standard “main region” token to this in case you want to add a little content to the page. (If you are copying an existing template like your “Inside.html” template you might already have this tag in your file.)

<$region name="main"$><$/region$>

3) Below that token in the template code add the following global menu token:

<$globalmenu cssClass="site-map" alwaysShowChildren="true" /$>

4) Upload those to your two files to your server through FTP or the LightCMS file manager.

5) Create a page called “Site Map” in LightCMS’s content management system and assign that new template to it.

Custom Title Tags for OpenCart

If you are concerned at all about SEO you won’t use OpenCart long before realizing that the out-of-the-box OpenCart software does not allow you to write page title tags that are different from the actual titles of your products. In the stock-version these two items are one and the same making it impossible to write custom title tags that look good in the search engines but don’t mess up the look and feel of your website.

The solution is actually very simple — and actually very FREE.

Just below the Meta Description field in the product admin area is the field for Meta Keywords. This tag has long been abandoned by the search engines so rendering it useless to us, until now.

Use that field in the admin area to enter all of your unique page title tags and then just do a slight modification to the header template and voila, custom title tags for OpenCart!

Here’s the code:

Edit is file: "/catalog/view/theme/YOURTHEME/template/common/header.tpl"

Replace this:

<?php echo $title; ?>

With this:

<?php if ($keywords) { echo $keywords; } else { echo $title; } ?>

Then, simply delete the useless meta keyword tag to keep things clean in the code.

WordPress query_posts() References

Some good reference pages for WordPress’ query_posts() functionality.

WordPress function reference -> http://codex.wordpress.org/Function_Reference/query_posts

Quick overview of what it does -> http://ifelse.co.uk/archives/2005/03/31/query_posts/

Always to be used with wp_reset_query(). -> http://codex.wordpress.org/Function_Reference/wp_reset_query

query_posts() is the easiest way to alter the default query that WordPress uses to display posts. Use query_posts() to display different posts than those that would normally show up at a specific URL.

It is not only used to display different posts than what is displayed by standard functionality, it can be used to display WordPress posts in different order. Example: display pages or a post category that contains posts that do not follow a typical blog layout (ex: a listing books or authors in alphabetical order).