Displaying other pages inside blog

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
techiem2
Regular
Posts: 35
Joined: Sun Feb 15, 2004 6:59 am
Contact:

Displaying other pages inside blog

Post by techiem2 »

I'm currently using an odd wrapper/layout/embed method with s9y on my site.
The blog file is blog.php.
Index.php sets the layout and such and includes blog.php.
http://techiem2.no-ip.com:444

This setup is working fairly well, with a few glitches due to the odd embedding method.

I know that I can put my site menu inside the blog using the php box plugin.
Is there a way to set things up so that local menu links load inside the blog content area so I can use the blog set more purely and clean up my mess?

This would make my setup much cleaner.
I have a pure s9y install on a second box for testing such things out.

Thanks.

Mark II
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Displaying other pages inside blog

Post by garvinhicking »

Have a look at our Smarty templating and Smarty in general.

You could easily create and register a Smarty function to print out your menu. Then just edit your index.tpl template and access your custom function:

Code: Select all

{techiem_print_menu}
Look at files like templates/kubrick/config.inc.php and how to register/use smarty functions in include/functions_smarty.inc.php :-)

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/
techiem2
Regular
Posts: 35
Joined: Sun Feb 15, 2004 6:59 am
Contact:

Post by techiem2 »

The menu integrates fine (so far as I've been able to test) using the phpbox plugin.
I'm trying to figure out how to make other pages display in the blog content area.
As my normal site is now, the home page includes the blog in the content div, and then I use something like index.php?page=resume/index to load /resume/index.php into the content section instead.
While this works for the most part (there are a few bugs with the blog and some content), I'd like to be able to integrate this directly into the blog.
So I click resume on the menu, and it loads the resume into the blog content section (where the articles would be).
Kinda like the guestbook plugin and static page plugin, except it would be able to send any page you specify to the blog content section using some url formation.
Thanks again.

I'll still be looking at the above suggestion to see if there's a cleaner way to integrate the menu than using the phpbox plugin. Although it seems to work quite nicely.

Mark II
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

What you want to do is what we do exactly via the external plugin API event hook.

Look at our additional plugins like static page, externalphp or guestbook how they do that.

And your navigation should also be outsourced as a native plugin. That's much faster then a phpbox plugin, much more secure, and much more portable.

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/
techiem2
Regular
Posts: 35
Joined: Sun Feb 15, 2004 6:59 am
Contact:

Post by techiem2 »

K. I'll do that.
I figure it can't be that difficult to do.
And would make using s9y for full content management easier.
As it is now, I have it pseudo-integrated, which works, but lacks the consistency I want.
(Yes, I know I am trying to do odd things.)
:)

TechieM2
Post Reply