<mt:Pages>

A block tag which iterates over a list of published pages from a blog and outputs a selection of pages that are appropriate for the context used and the template being published.

<mt:Pages>
    <$mt:PageTitle$>
    <$mt:PageBody$>
</mt:Pages>

A pages is a class of entry, essentially non-date-based entries. Thus all attriutes of mt:Entries can also be used with mt:Pages.

Page-related tags can be used inside the mt:Pages loop block. Most page-related tags are alias’ of Entry-related tags, thus most can be used interchangeably.

In the same way folder is a class of category.

Attributes

All of the non entry-specific attributes of mt:Entries can be used with mt:Pages.

Attributes unique to mt:Pages:


folder

Filter the resulting pages by a particular folder. Use folder label (not folder basename) as the value. Similar to mt:Entries category

<mt:Pages folder="About Us">
    <$mt:PageLabel$>
</mt:Pages>

include_subfolders

Boolean value, 1 or 0 (default). If specified in conjunction with the folder attribute, pages assigned to subfolders of the identified folder/folders will be included in the set of pages. Similar to the include_subcategories in mt:Entries.

Specify ‘1’ to cause all pages that may exist within subfolders to the folder in context to be included.

Return pages in the folder “About Us” and any pages in subfolders of the “About Us” folder:

<mt:Pages folder="About Us" include_subfolders="1">
    <$mt:PageLabel$>
</mt:Pages>

no_folder

Returns all pages not associated to a folder.

List all pages not contained in a folder:

<mt:Pages no_folder="1">
    <!-- do something -->
</mt:Pages>

Example

See mt:Entries examples

Display the 10 most recent pages in the folder “Locations”:

<mt:Pages folder="Locations" lastn="10">
    <!-- do something -->
</mt:Pages>

Display the pages in the folder “Locations” sorted by title, listed in ascending order:

<mt:Pages folder="Locations" sort_by="title" sort_order="ascend">
    <!-- do something -->
</mt:Pages>
This page was last updated on 2009-12-07, 01:37.

5 Notes

PageLabel doesn't appear to be a tag in use anymore.

sort_by="title"

how can I sort it by something else?

Im suppose the tag is: "PageTitle"

PageLabel doesnt work

Leave a note

Have a question? Please use the MT Forums. Notes submitted on documentation should pertain to tips & hints regarding documentation. Your note may be removed once its contents have been integrated into the body of the page.