Community « Discussion forum « Post your requirements here «
Better support for different / and /yacs pages
My need is to have a "site" home page at / and a "yacs" homepage at /yacs. I could use better support to make those truly distinct, e.g., for Page::top_focus()
In order to have separate tabs for / and /yacs I had to hack skins/page.php with something like
It seemed like a lot of effort to figure out these tweaks, could yacs support a better way?
Also, I notice that http://www.yetanothercommunitysystem.com and http://www.yetanothercommunitysystem.com/yacs both "activate" the YACS tab (because they're both considered "home" by top_focus), but those two have different content, kind of confusing. I didn't want that behavior.
I'm not needing a fancy subsystem here, just a little cleanup in the tabbing and skinning stuff to distinguish / and /yacs.
function top_focus($prefix='tab_') {
global $context;
// not sure there is a focus
$output = NULL;
// alter 'home' logic for site with unique page at slash
if($_SERVER['REQUEST_URI'] '/' || $_SERVER['REQUEST_URI']
'/index.php')
$output = 'slash';
// focus on home tab
elseif($context['skin_variant'] == 'home')
$output = 'home';
and the put the following in my skin template.php
Page::tabs(FALSE, FALSE, array('/' => array(NULL, '/', NULL, 'slash'),
'/technotes' => array(NULL, '/technotes', NULL, 'home')));
Also, I tweaked the site slogan in my skin to note display at /. It seemed like a lot of effort to figure out these tweaks, could yacs support a better way?
Also, I notice that http://www.yetanothercommunitysystem.com and http://www.yetanothercommunitysystem.com/yacs both "activate" the YACS tab (because they're both considered "home" by top_focus), but those two have different content, kind of confusing. I didn't want that behavior.
I'm not needing a fancy subsystem here, just a little cleanup in the tabbing and skinning stuff to distinguish / and /yacs.
Btw, I use /technotes instead of /yacs, "mv yacs technotes", if you will.

