Skip to main content Help Control Panel

YACS CMS : Open source !

Community «   Discussion forum «   Post your requirements here «  

Better support for different / and /yacs pages

avatarMorison, Rodney -- on Sep. 2 2007
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
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(FALSEFALSE, 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.

Oh yeah, the sites at www.morison.biz . See how that page is different than www.morison.biz/technotes .

Comments

Bernard
avatar
from nearby-an-airport
Associate, 6997 posts

on Sep. 15 2007


Rod, the function pages::top_focus() has been modified as per your suggestion, and your name has been added to the list of authors of YACS. This will be reflected in next release.

 
Share
Information channels
Recent files