yii1cms_header.jpg


A Page Listing is a common construct in web pages.  We do this with a special shared block plug in called pagelist.  Its a simple field ; value pair.  Usually name or better yet keywords.    A page can have many many keywords and only one name or catagory. 

So Step 1:  Create a Shared Block of the type "pagelist" .

Step 2:
After the new block is saved it refreshes with a new set of tabs.  The system doesn't know what sort of tabs to build and options for a block until its saved.

In this case I've simply used the field "keywords" and a value of "examplelist"   This will do a search for all released / live pages accessable by the current role for pages with the keyword "examplelist" in the page the block is inserted into.

Step 3:
Now you need to add the block to a page
Open or create a page.  In an hrml area of your chosing, add a token in the page for where you want the list to display.   The token can be "anything" but keep it simple.  Use {pagelist} for a list of pages in a page.   If you have several pagelists.. call them {pagelist1} and {pagelist2} ctc. 

Step 4:
Add the block to the page.
Go to the Shared Blocks Tab on the page, Add > The block  and give it the token you've used in the previous step.

When the page displays it looks to see what ever shared blocks are assigned, and does the replacement.

The block must be "live" and accessible to the role of the user viewing the page.

Step 5:
Final step.  Make sure you have the keywords on the pages you want to display in the list.  Once these are set you are ready to go.   Pages can be added or removed simply by changing keywords, and pages can show up in various pagelists that use different keywords.   Its a very powerful and easy way to get to lists of pages.