logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: Navigation Templates and Run Mode: msg#00102

Subject: Re: Navigation Templates and Run Mode
On Thu, Oct 20, 2005 at 12:00:58AM +0200, B10m wrote:
> * Brett Sanger <swiftone@xxxxxxxxxxxx> [2005-10-19 15:04:42-0400]
> [Highlighting runmode navigation in template]
> > So I tried to move to include a Nav template.  For that to work,
> > however, I need to make my run_mode visible to my template, which bugs
> > me in some way.  The template shouldn't care.  But then, the template
> > has to know the OTHER run modes to send you there, so I guess it's not a
> > big deal, but it does bug me.
> 
> I don't see the big problem here. The template is supposed to know
> the runmode, for then it can make decissions of where to send you
> next. I might be missing something here ...

That's not quite how I see it.  The templates isn't supposed to CARE
about your current runmode, it's simply showing a set of options.  The
app calls the appropriate template based on the runmode.  The app should
make that decision, not the template.

Now, in practical terms, it's not a big deal.  It's just a violation of
mental boundries that sets off a red flag, like having code in your
template, or doing formatting in the application.

> In navigationmenu.tt2, I'd hack something like this:
> <ul id="navigation">
>    <li[% (rm == 'rm1') ? ' id="current"' : '' %]>
>       <a href="/app/rm1">Runmode 1</a>

That's much what I have.  It's looking like that's what everyone else
does too, so I guess I'm looking for extra simplicity where there is none.

-- 
SwiftOne  /  Brett Sanger
swiftone@xxxxxxxxxxxx   

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/cgiapp@xxxxxxxxxxxxxxxxx/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: cgiapp-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: cgiapp-help@xxxxxxxxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>