how can I use the same source on two different pages?

3 posts by 3 authors in: Forums > CMS Builder
Last Post: September 14, 2009   (RSS)

Does anyone know if I can use the same data source in CMSB on two different pages?

Here is the situation. I have a site with both a public part and a password protected section. They have slightly different templates and of course one page is secure and the other is not.

I have a multi-record section that I want to use on two different templates - because I need to put the URL path in the cmsb record section I am not sure if I could do this let alone how.

The public part of the website is here: http://www.tpschool.org the private part is the parent portal referenced on that page (but not live yet). Under "who we are" is a section called family diversity @tps and I want to have that same information included in the parent portal but with the parent portal template.

The parent portal in its undone state is here: http://www.tpschool.org/pptl/index.php

any help is appreciated.

Thanks

craig
Thanks

Craig

Re: [craighodges] how can I use the same source on two different pages?

By InHouse - September 13, 2009 - edited: September 15, 2009

Hi Craig,

I may not be fully grasping the situation but this sounds easy enough. What I often do with chunks that need to appear in several places is to create a display file (child page) with both the call to select the records and the display code all together. Be sure to remove all the <HTML>, <BODY> and <HEAD> tags since these will be provided by the parent files.

Then, wherever you want the display to happen on a parent page use a PHP include:

<?php include("path/filename.php"); ?>

Since the require path is relative from the root, it does not really matter what pages the child is pulled into.

Of course... I may have misunderstood your situation. If so, I do apologize.

Cheers,
J.