Page 1 of 1

Getting a page's content block

Posted: Thu Feb 21, 2008 6:04 pm
by forbairt
Short time reader / fan (started last week and have templated 4 sites so far and I'm LOVING it)

My problem is I'd like to be able to grab a content block from a page (not the current page)

I'm having difficulty finding out if its possible to do this ?

I was hoping that {content} would have some form like {content page="about"} but I'm assuming it doesn't as there is no documentation on it ? (or I can't find it at any rate)

Any help would be appreciated. Before you ask I could go and write a module to do this ... but I was hoping it would already exist ...

If not and there is any interest I may make a module to do this ?

Thanks for any help,
James

Re: Getting a page's content block

Posted: Thu Feb 21, 2008 6:19 pm
by calguy1000
get the cgsimplesmarty module it has a function to do just that.

Re: Getting a page's content block

Posted: Thu Feb 21, 2008 6:40 pm
by forbairt
cheers calguy1000 get_page_content($alias,[$block],[$assign]) looks to be exactly what I'm after

Re: Getting a page's content block

Posted: Thu Feb 21, 2008 9:59 pm
by calguy1000
you may have to 'eval' the results with the smarty {eval} tag to get the content rendered properly

Re: Getting a page's content block

Posted: Sat Dec 27, 2008 11:43 pm
by lucid
So just a tip I thought that I would put here.

- You can us $cgsimple in another page content. ( I think that's right, if someone knows a way you can that would be great).
- So I created a UDT to extract and display the content block

hope this helps