Hi, i am currently developing an ajax-driven website (http://www.warpzone.at) using serendipity in embedded mode. I removed the sidebar from the index.tpl. Now i want to Popup eg the Archive or Blogroll sidebar plugin. I tried to create a new php file besides the index.php of serendipity, but somehow i just cannot output just the sidebar contents ;-(
Is there any possibility?
tia
Azzy
get Plugincontents vom within an PHP file
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: get Plugincontents vom within an PHP file
Hi!
You can use a PHP file like this to get just the sidebar output:
Then you need to create a smarty template file with a content like this:
(this would be saved in the templates/yourtemplate/only_sidebars.tpl structure)
If you want (because of performance issues) to not utilize the Smarty framework for wrapping the sidebaars you could use a PHP code like this:
I'm very interested in the results of your page, please let us know about your progress! Also if you need any more help!
Best regards,
Garvin
You can use a PHP file like this to get just the sidebar output:
Code: Select all
<?php
// Include the s9y framework:
include 'serendipity_config.inc.php';
// Initialize the SMARTY templating framework
serendipity_smarty_init();
// Parse and display a custom SMARTY template file:
$serendipity['smarty']->display(serendipity_getTemplateFile('only_sidebars.tpl', 'serendipityPath'));
?>
Code: Select all
<div>
{serendipity_printSidebar side="left"}
</div>
If you want (because of performance issues) to not utilize the Smarty framework for wrapping the sidebaars you could use a PHP code like this:
Code: Select all
<?php
// Include the s9y framework:
include 'serendipity_config.inc.php';
echo serendipity_plugin_api::generate_plugins('left');
?>
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/