How to get the parent content into a child element? [solved]

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
memerson
Forum Members
Forum Members
Posts: 14
Joined: Mon Mar 23, 2009 5:03 pm

How to get the parent content into a child element? [solved]

Post by memerson »

Dear all

I am looking for a way to be able to pull in parent content to its children. I know this can be done the other way around as I have already done this, but I need to echo content from the parent page to each child page.

Here is an example.

The parent page is called My Portfolio. On this page there is a small introduction, but the template pulls in the first 3 child pages as a list - which in this case are each portfolio piece.

Lets say there are 5 child pages, each named Portfolio Piece 1, Portfolio Piece 2 etc. The aforementioned small introduction on the parent page will need to be displayed on a column which CANNOT be edited or accessed by our client who will be using the CMS. He should only get access to the Portfolio Piece page and the introduction should be automatically pulled in from the parent.

I hope I have described it well enough! If anyone knows how to do this (I have browsed the API and the best I could muster was getting the Parent ID only) I would be very grateful.

Thank you in advance,
Michael
Last edited by memerson on Tue Mar 31, 2009 2:21 pm, edited 1 time in total.
alby

Re: How to get the parent content into a child element?

Post by alby »

memerson wrote: I am looking for a way to be able to pull in parent content to its children. I know this can be done the other way around as I have already done this, but I need to echo content from the parent page to each child page.
Look for CGSimpleSmarty module

Alby
memerson
Forum Members
Forum Members
Posts: 14
Joined: Mon Mar 23, 2009 5:03 pm

Re: How to get the parent content into a child element?

Post by memerson »

I'll look into implementing it, thanks
Post Reply

Return to “Developers Discussion”