GetSimple Support Forum

Full Version: Parse content from another page...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a "good" way to have content from another page beeing pulled into a page.
For example to have content from an "About Us" - section pulled into the "Home" - section of a get simple website.
I guess you could just use some PHP like simpleXML to load & parse the XML-file for that section but I just wonder if there is another way of doing it that is more related to the get simple cms.

Best, Niklas
just use getPageContent('slug_name') to output content from another page
Aha!
Thank you very much for that answer!

Niklas
Hmm...now I've tried this but it seems as though it doesn't work.
No matter what I do it still treat it as if the code would be <?php get_page_content(); ?>

Niklas
What version of GS are you using , this function is from version 3.1 onwards.
n00dles101 Wrote:What version of GS are you using , this function is from version 3.1 onwards.

Hi - thanks for a fast answer!

I'm using version 3.1

I have a page with a slug that is kontakt - i.e www.mysite.com/kontakt
Then I try this <?php get_page_content('kontakt'); ?> with no result other than it outputs the content as if I would be using <?php get_page_content(); ?>
Yes this is what it does.

It allows you to pull in the content areas from other pages into 1.

What exactly are you trying to do?
Hi!
Hmmm...maybe we misunderstand each other or maybe I misunderstood the whole thing.
I'm trying to have the content for the kontakt-section or "kontakt-page" to be displayed on the start/index page. When is use <?php get_page_content('kontakt'); ?> on the indexpage it still display the content for the startpage. Am I missing something obvious here? :?

Niklas
widecircle Wrote:Hi!
Hmmm...maybe we misunderstand each other or maybe I misunderstood the whole thing.
I'm trying to have the content for the kontakt-section or "kontakt-page" to be displayed on the start/index page. When is use <?php get_page_content('kontakt'); ?> on the indexpage it still display the content for the startpage. Am I missing something obvious here? :?

Niklas

Oh - and to clarify - the slug of what I call "kontakt-page" is kontakt..
it's a different function your using.

use : getPageContent('slug_name')

The one your using is for the current page only.
Oh - crap!
I was missing something obvious - how embarrassing. Smile
Thank you very much for taking some of your time to help me out... Smile
Now it works like a charm!!

Niklas
no problem...
good luck with the sitte...
n00dles101 Wrote:no problem...
good luck with the sitte...

wow thats not confusing at all.
I say we replace that with an alias getContentForPage() in the future.