Search code examples
codeigniterpyrocms

PyroCMS: How to include one page inside another


I have a site with an "About us" page which is divided into multiple sections.

About Us
    +Overview
    +The Company
    +Our services
    +Future plans
    (etc)

I want to have a floated block on the right hand side of each of these pages which contains links to every other page.

Ideally, what I would like is to create a page titled AboutUsSidebar, and then be able to include this page in all of the about sections through some kind of tag, ie..

{include('Sidebar')}

Is there anything like this in PyroCMS? Or perhaps a better way to do it?


Solution

  • In the end what I was able to achieve the desired result by using a page type.

    I have a page type called "About" which contains the sidebar html, then I use pages on top of that page type for each of the sections.

    Worked very nicely.