We Provide progressive business solutions

Researchg

Web Content Management Systems
A universal interface to connect to and manage any content management system.

solutions

Consolidating Control Panel Interfaces
Designing one interface to connect through the APIs of disparate content management systems

Results

Extending Core Applications
Every CMS has it's own way of doing things. A place to organize the different ways to do things in different types of content management systems.

Navigation

Login

Getting ready

To get started you will need the package, getResources 1.0.0-ga.

How to do it...

  1. Create a Document that will serve as your blog listing page. Use the code below.

To obscure the Element Properties we can create a Template Variable. Create a Template Variable called ShowBlogContent and point to your getResources snippet. This will make this dynamic part of the site appear in the Document, with descriptive labels. This creates a clean layer of Template Variables you can manage with the html elements you need to use. Example code of your blog listing Document Resource:

[*ShowBlogContent]

  1. In your snippet use the parents property, to obtain the value of the Resources that are children of the blog listing page. We want to include the content, too. Example code.

[!getResources?
&parents=`29`
&includeContent=`1`
&tpl=`BlogEntriesTpl`]

  1. Create a Chunk Element to use as your tpl (template). Use placeholders with html to design the layout for the individual blog entries. The below example will only work if you are using url rewriting.

<div>
<h2><a href=.html></a></h2>
<p></p>
<em></em>
</div>

  1. Create the Documents that will serve as the blog content pages. Make sure the Parent Resource points to your blog listing page. The quickest way to do this is to right-click on the blog listing page in the Tree, and select Quick Create > Document.

  1. Once you have all the Resources created

How it works...

Using this one snippet to manage your blog listings and pages can be done very quickly.

Remove the tpl property from your snippet call. This will output an array of the properties that are returned from the MODx API. These are the values that can be used in your placeholders.