Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
get_page_content for other pages
#1
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.
Reply
#2
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.
My Github Repos: Github
Website: DigiMute
Reply
#3
Thanks for that, I couldn't find anything in the search but this works great.
Reply




Users browsing this thread: 1 Guest(s)