From: Timothy M. A. <ti...@ad...> - 2004-05-27 22:30:09
|
On Thu, 2004-05-27 at 11:52, Chris Winters wrote: > > ... > > Getting down to work, I tried to remove all of the "boxes" and such from > > the /index.html document and create just a login box. The thing is, I > > can't seem to figure out how to get the user information to display > > anywhere other than in the user info box. I know there's something I'm > > just not grokking here. So, I wanted the template to do something like > > this pseudo-code: > > > > [%- IF user.authenticated -%] > > ( Display boxes ) > > ( Display default welcome page ) > > [%- ELSE -%] > > ( Display Login Form ) > > [%- END -%] > > > > The entire admin app should be locked down, requiring the user to be > > logged in before any page to be displayed. > > Check out the template toolkit plugin at: > > OI1: OpenInteract::Template::Plugin > OI2: OpenInteract2::TT2::Plugin > > The plugin allows you to do something like this in your main template > ('base_main'), using the plugin through the reserved 'OI' name: [SNIP] Ahh, OK! This is just the brain-kick I needed. Thanks! I did notice the OI "object" being used in the templates, but I couldn't find it mentioned in any of the docs. I had started going through all of the modules created as part of the new website, but I hadn't reached the Template module yet. Now that I know where the OI template variable gets plugged in, I can get a better grasp on how the system flows. I'm sure I'll run into other things as I go along, but this will give me a great start. [SNIP] > Hope this helps! Absolutely! Thanks! /tma |