Posts: 3
Threads: 1
Joined: Feb 2013
Hello, I could not find the answer to this question somehow so here is my first post. I want to be able to display the child page of the parent page in a seperate content area on the same page. So every page on the website will have its own content and its childs content in a seperate box. (I want a different picture to be displayed for every page) Is there an easy way to achieve this or how can i do this? Thanks alot in advance.
Posts: 2,906
Threads: 193
Joined: Feb 2011
maybe simplepagecontent is for you?
http://get-simple.info/extend/plugin/sim...ontent/87/
or this plugin: Page Caching:
http://get-simple.info/extend/plugin/page-caching/65/
I am sure you will find help if you are stuck, I do not use these plugins, but they seem reasonable to me
Cheers, Connie
Posts: 1,108
Threads: 70
Joined: Aug 2009
PageCaching is obsolete and is included in the core of GetSimple since 3.1
I'll remove it from Extend.
Posts: 3
Threads: 1
Joined: Feb 2013
Does simplepage allow me to have different content in this block for every page?
Posts: 2,906
Threads: 193
Joined: Feb 2011
hanker,
please try it out, it will only take some minutes and you know your needs the best
Posts: 3
Threads: 1
Joined: Feb 2013
2013-03-01, 06:11:13
(This post was last modified: 2013-03-01, 06:11:32 by hanker.)
Ah i got it to work
for other people interested I installed the simplepage content which allows you to echo a page by its slug "echo get_page_by_id('pages-slug'); " and then it is very easy to use "if (return_page_slug()=='page-slug')" to create a page-dependency.
My code now looks like this and works like a charm:
<?php if (return_page_slug()=='page-slug') echo get_page_by_id('pages-slug'); ?>
etc.
thanks for the help
Posts: 3,491
Threads: 106
Joined: Mar 2010
2013-03-01, 08:45:41
(This post was last modified: 2013-03-01, 08:47:00 by Carlos.)
Since GS 3.1 you can do that without a plugin. Instead of
get_page_by_id you could use the built-in function
getPageContent (more info here:
http://get-simple.info/wiki/config:caching-function )
(AFAIK the only difference is that SimplePageContent's function doesn't run the
content filter)