Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Link GS to existing WebSite
#1
Hi,

I've created a website for one of our client. Now, I would like to link it with GS.

I think first that I could include GS pages into my website (includes('GS/data/pages/footer.xml')Wink.

However, GS generate XML. So, how can I include those XML files into my website ?

The purpose is to give my client an easy way to edit static files such as content or footer.

PS : The site is built in PHP

Thx,

Rob
Reply
#2
Things like this will not be easy to do until 3.4.

You could always load the xml on your own in php and just use our code.


psuedocode
PHP Code:
/**
 * Get XML Data
 *
 * Turns the XML file into an object 
 *
 * @since 1.0
 *
 * @param string $file
 * @return object
 */
function getXML($file,$nocdata true) {
    
$xml file_get_contents($file);
    if(
$xml){
        
$data simplexml_load_string($xml'SimpleXMLExtended'$nocdata LIBXML_NOCDATA null);
        return 
$data;
    }    
}

$page getXML('data/pages/mypage.xml');
echo 
$page->content
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
Yes, I looked in GetSimple source code and found this function. But I wish you could provide me a better solution Smile

Thx
Reply
#4
better how ?

That does what you asked.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)