PCMS2 Templates
Without using templates everything seems to be working as it should. However, I have attempted to use the template approach a couple of times without success.
Everything looks as it should from within the Admin area of PCMS2 (logged in as Super Admin). I see the template (about-us) page, and its indented child "page" called "history". Each has its own unique text inside of a single "mainContent" content area. The template page has the following developer notes:
<?php
include('/homepages/9/d327801321/htdocs/procms/WA_CMS/addtosite.php');
echo WA_getCMSContent($database_PowerCMSConnection, $PowerCMSConnection, 'about-us', 'mainContent', false);
?>
The url to the history page is located in the first include within the following:
<ul class="level-0" id="cssmw">
<li><a href="index.php">Home</a></li>
<li class="parent" id="current"><a class="current" href="#">About Us</a>
<ul class="level-1">
<?php require_once('CSSMenuWriter/includes-menu/inc-about.php'); ?>
</ul>
</li>
<li class="parent"><a href="galleries.php">Galleries</a>
<ul class="level-1">
<?php require_once('CSSMenuWriter/includes-menu/inc-galleries.php'); ?>
</ul>
</li>
<li><a href="calendar.php">Calendar</a></li>
<li><a href="how-to-join.php">How to Join</a></li>
<li><a href="video.php">Video</a></li>
<li><a href="links.php">Links</a></li>
<li class="parent"><a href="archive.php">Archive</a>
<ul class="level-1">
<?php require_once('CSSMenuWriter/includes-menu/inc-archive.php'); ?>
</ul>
</li>
<li><a href="contact-us.php">Contact Us</a></li>
</ul>
The include (inc-about.php) that contains the template url is as follows:
<li><a href="who-we-are.php">Who we are</a></li>
<li><a href="what-we-do.php">What we do</a></li>
<!--<li><a href="history.php">History</a></li>-->
<li><a href="about-us.php?about-us=1">History</a></li>
Notice that the developer notes for the history "child" is:
?about-us=1
which I think I appended above correctly.
Notice too that I commented out the original history page in favor of trying the template approach. The goal would be to have all three of the above pages be part of the about us template.
Here is the problem. When I view the about-us.php page from the browser as a site visitor would (logged out of admin), or while still logged in with the "edit" prompt in place, the page shows the "history" page content. The history page shows the correct history content as you would expect.
Again, everything looks fine inside of the CMS, but the browser view of the about us page seems to have a problem. There are no other problems with the site navigation, and there are no problems with the non-template approach. Where have I gone wrong?
To be honest I am not even sure that my intentions match the intended use for templates as envisioned by WA. In my setup I believe the navigation would also need to be "editable" from within the CMS in order for there to be any benefit from adding template based "pages". At this point the site navigation is not. Please share your thoughts on this point too.
Thanks,
Robert