GetSimple Support Forum

Full Version: get_page_content for other pages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I'm looking to create the functionality posted here:

http://get-simple.info/forum/viewtopic.php?id=576

Basically I need to be able to call the get_page_content function for a specific page such as, get_page_content('services').

If anybody could give me some help, guidance with this I would be very greatful.

Thanks.
posted something a while ago, this should do it:

Code:
function get_content($page){  
        $path = "data/pages";
        $thisfile = @file_get_contents('data/pages/'.$page.'.xml');
        $data = simplexml_load_string($thisfile);
        echo stripslashes(htmlspecialchars_decode($data->content, ENT_QUOTES));;
}

Mike.
Thanks for that, I couldn't find anything in the search but this works great.