yet another embedding question
Posted: Sun Apr 09, 2006 10:04 pm
Hi, I'm trying to embed s9y into an existing site that has existing templates / css, etc.
I've been reading and reading the main docs and forum posts on this subject, but don't still quite seem to get it.
I was trying the 'wrapper.php' approach, where I have a page called, say, 'blog.php' in the root directory in the main site, which would be the page where I want all content to show.
The page 'blog.php' contains the following code to build the page:
<? require("serendipity/wrapper.php");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD><TITLE>MY BLOG</TITLE>
<? include("scripts/toptemplate.php");?>
<? echo $blog;?>
<? include("scripts/footer.php");?>
The page 'wrapper.php' in the serendipity directory contains the following code:
<?
ob_start();
$a = getcwd();
chdir($a."/serendipity");
require("index.php");
chdir($a);
$blog = ob_get_contents();
ob_end_clean();
?>
Now, this is OK and it will show the serendipity blog embedded within the page.
However, if I click on any of links, this takes me to a new page within the serendipity directory - effectively out of the main site.
I can't quite figure out what I need to tweak at this point to get this working.
I don't want to embed into an iframe, as this means that search engines will have difficulty spidering the content.
Is it actually possible to effectively run everything from one URL using GET query string ?
Thanks
Neil.
I've been reading and reading the main docs and forum posts on this subject, but don't still quite seem to get it.
I was trying the 'wrapper.php' approach, where I have a page called, say, 'blog.php' in the root directory in the main site, which would be the page where I want all content to show.
The page 'blog.php' contains the following code to build the page:
<? require("serendipity/wrapper.php");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD><TITLE>MY BLOG</TITLE>
<? include("scripts/toptemplate.php");?>
<? echo $blog;?>
<? include("scripts/footer.php");?>
The page 'wrapper.php' in the serendipity directory contains the following code:
<?
ob_start();
$a = getcwd();
chdir($a."/serendipity");
require("index.php");
chdir($a);
$blog = ob_get_contents();
ob_end_clean();
?>
Now, this is OK and it will show the serendipity blog embedded within the page.
However, if I click on any of links, this takes me to a new page within the serendipity directory - effectively out of the main site.
I can't quite figure out what I need to tweak at this point to get this working.
I don't want to embed into an iframe, as this means that search engines will have difficulty spidering the content.
Is it actually possible to effectively run everything from one URL using GET query string ?
Thanks
Neil.