Nevermind. Worked it out. (I think I should save these emails in
draft for a bit longer ;-) ).
"Fudging" it using $theme->assign('post', Post::get(array('slug' => 'photos')));
If anyone has any better ideas, I'm still open to suggestions.
On Tue, Jan 27, 2009 at 6:08 PM, Colin <[email protected]> wrote:
> Hi all
>
> I'm in the process of creating a plugin that will allow users to
> display a gallery using images from SmugMug within Habari (like FAlbum
> for Wordpress).
>
> Now I've got it all working a treat and am starting to iron out the
> niggles and make is presentable.
>
> One of the issues I have is how I can get Habari to behave as if I'm
> presenting the data from a page, in particular so the highlighting of
> the current tab is correct when viewing the gallery. I'm using the
> supplied K2 theme at the moment, but the same principals for tab
> selection seems to be common amongst the themes I've checked.
>
> At the moment, I have a rewrite rule in place that intercepts the
> calls to "pagename" and it's "sub-paths", eg
> "photos/galleryID/photoID" and all the URL params are passed to the
> underlying code and the gallery is displayed. No probs. However as
> the actual page isn't displayed the "tab" isn't highlighted as the
> "current page".
>
> Does anyone have any suggestions on how I can effectively pass "$post"
> to the theme so it's "isset($post) && $post->slug" check will work and
> highlight the tab?
>
> I've created a blank page to get the tab in the list of pages, but as
> I intercept the request before it actually gets to displaying the page
> content, this has no effect when it gets to the theme.
>
> I don't want to have to modify the actual theme itself either.
>
> Any suggestions would be greatly appreciated.
>
> Cheers,
> Colin
>
>
> --
> Colin Seymour
> Blog: http://www.colinseymour.co.uk
> Tech Stuff: http://www.lildude.co.uk
>
--
Colin Seymour
Blog: http://www.colinseymour.co.uk
Tech Stuff: http://www.lildude.co.uk
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/habari-dev
-~----------~----~----~----~------~----~------~--~---