[solved] Possible to get page content with MenuManager?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Cerulean
Forum Members
Forum Members
Posts: 172
Joined: Mon Nov 01, 2010 8:56 am

[solved] Possible to get page content with MenuManager?

Post by Cerulean »

There is a staff profiles section on a site I am developing. As well as the separate profile page for each staff member, my client wants "summary profiles" on the section landing page, showing a photo, phone number, a few other details, and a link through to the full profile.

I'd like to be able to automate the generation of the summary profiles so they are automatically updated when a staff profile page is created or deleted.

So I'm wondering if it's possible to use a MenuManager template to pull in page content from sub-pages in the Staff section. Maybe set up a second content block on each page with the summary details and then get that content block in the MenuManager template. But the MenuManager help doesn't mention such a thing so I'm thinking it probably isn't possible.

I know there are other possibilities such as using the "Extra" fields in Page Options, or making the staff profiles News articles and using a summary template, but I thought I'd ask first in case anyone has a solution (UDT maybe) for getting specified content blocks from all pages in a part of the site hierarchy.
Last edited by Cerulean on Tue Feb 21, 2012 8:18 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Possible to get page content with MenuManager?

Post by Dr.CSS »

Try using Company Directory, I renamed it once to Staff Directory for someone...
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: Possible to get page content with MenuManager?

Post by Wishbone »

Yes.. Use CGSimpleSmarty. There's a function you can use to get page content.
Cerulean
Forum Members
Forum Members
Posts: 172
Joined: Mon Nov 01, 2010 8:56 am

Re: Possible to get page content with MenuManager?

Post by Cerulean »

@Dr.CSS - Thanks for the tip. I will try Wishbone's suggestion first, as I think it will be more intuitive for the client to edit staff profiles in the Pages section rather than breaking them off into the separate Company Directory section in the admin.

@Wishbone - that is perfect!
For anyone wanting to do the same, the code I used in the MenuManager template was:
{capture assign='thealias'}{$node->alias}{/capture}
{$cgsimple->get_page_content($thealias,'summary-block')}
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: [solved] Possible to get page content with MenuManager?

Post by Wishbone »

Or even better:

{$cgsimple->get_page_content($node->alias,'summary-block')}
Cerulean
Forum Members
Forum Members
Posts: 172
Joined: Mon Nov 01, 2010 8:56 am

Re: [solved] Possible to get page content with MenuManager?

Post by Cerulean »

Didn't realise they could be combined like that. Nice.
Post Reply

Return to “CMSMS Core”