Hello,
Instead of having the category list and the feed list in a sidebar on my blog, I'd like to have them on their own separate page instead.
Now I searched this forum already, and found a thread that referenced http://www.s9y.org/78.html.
So that got me part of the way there. But I still have a few questions:
First off, I think I need to be using serendipity_showPlugin. But I can't find the magic value for class that will show me the categories. (I haven't tried the feeds yet, so if someone would like to just tell me that class...)
Secondly, I can't find an elegant way to create these pages. I'd really like to just do that outside s9y, but still use my s9y theme. Not sure how to do it though.
I installed the Smarty markup plugin, but it has no option to enable it only for static pages. If I enable it far enough that it works for static pages, it is also used for my stories, which messes things up.
Making a separate Categories or Feeds page
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Making a separate Categories or Feeds page
Categories and Syndication plugin are both internal plugins found in the include/plugin_internal.inc.php file. Their nomenclature is a tad different than usual plugins. Their class names are "serendipity_categories_plugin" and "serendipity_syndication_plugin".
The best way of creating pages is to create an event plugin that listens to the "external_plugin" hook. You can then create a page call like this:
http://yoururl/plugin/myfeed
http://yoururl/plugin/mycategories
The plugni will use the hook in a way like this:
Then you have a myfeed.tpl and mycategories.tpl file that look something just like this:
There are many other ways to do this. Like creating a staticpage and using a custom Smarty function to display your stuff, or like adapting your plugin to use the entry_display hook, or to use the iframe wrapping plugin, or even to embed your custom code into the index.tpl template.
Or you could also make the call to the plugin showing inside your event plugin instead of within a template file. Or liek you mentioned with pure smarty markup plugin code .
Actually about 4-5 methods come to my mind, but I think the solution above is the most comprehendable.
Your suggestion about the smarty markup plugin for static pages only was a very good suggestion: I added a new type to the plugin and made it supportable in the staticpage plugin. CVS is down right now so I can neither create a diff nor commit it, so you'll need to wait a bit on this issue.
Regards,
Garvin
The best way of creating pages is to create an event plugin that listens to the "external_plugin" hook. You can then create a page call like this:
http://yoururl/plugin/myfeed
http://yoururl/plugin/mycategories
The plugni will use the hook in a way like this:
Code: Select all
...
case 'external_plugin':
if ($eventData != 'myfeed' && $eventData != 'mycategories') {
return true;
}
include S9Y_INCLUDE_PATH . 'include/genpage.inc.php';
serendipity_smarty_fetch('ENTRIES', $eventData . '.tpl');
$serendipity['smarty']->display(serendipity_getTemplateFile('index.tpl', 'serendipityPath'));
return true;
break;
...
Code: Select all
{serendipity_showPlugin class='serendipity_categories_plugin'}
Or you could also make the call to the plugin showing inside your event plugin instead of within a template file. Or liek you mentioned with pure smarty markup plugin code .
Actually about 4-5 methods come to my mind, but I think the solution above is the most comprehendable.
Your suggestion about the smarty markup plugin for static pages only was a very good suggestion: I added a new type to the plugin and made it supportable in the staticpage plugin. CVS is down right now so I can neither create a diff nor commit it, so you'll need to wait a bit on this issue.
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/