Displaying Page Content

Displaying Page content is as easy as displaying normal weblog entries. The primary difference is that when a Page URI is requested, the URL segments do not correlate to a template group and template, as that is determined by the template that the particular "page" entry was assigned to use on the Pages tab of the Publish form.

Additionally, the page will automatically be treated as a single entry page for that page entry, so other tags on the template will need to use the dynamic="off" parameter (if available) to display other content.

Displaying Page Content with a Weblog Entries Tag

On the template assigned to a Page entry, use a normal Weblog Entries tag with any parameters and variables that you desire to display the entry, e.g.:

{exp:weblog:entries weblog="personnel"}
   <h2>{title}</h2>

   <h3>Position</h3>
   {position}

   <h3>Background</h3>
   {background}

   <h3>Telephone Extension</h3>
   {extension}
{/exp:weblog:entries}

Parameters

The Pages Module adds the following parameters for use in the {exp:weblog:entries} tag.

Variables

The Pages Module adds the following variables for use in the {exp:weblog:entries} tag.

Top of Page

User Contributed Notes

Posted by: Eric Barstad on 29 February 2008 7:30pm
Eric Barstad's avatar

Re: Shape Shed’s comment: It seems that dynamic=“off” won’t allow pagination to work for “another_weblog”.

Posted by: George Ornbo on 1 August 2007 7:07am
George Ornbo's avatar

If you want to display content from multiple weblogs in a template accessed by a custom Pages Module URI you must include dynamic=“off” where you want to show any data not related to the custom URI. Otherwise the data will be served based on the custom URI.

{!-- This shows just content relevant to the Custom URI --}
{exp
:weblog:entries weblog="my_pages_weblog"}
{pages_content}
{
/exp:weblog:entries}

{
!-- This shows all entries in another_weblog --}
{exp
:weblog:entries weblog="another_weblog" dynamic="off"}
{title}
{
/exp:weblog:entries}

You must have an ExpressionEngine license and have attained a forum rank of "Lab Assistant" (100 posts) to contribute notes to the User Guide