Perhaps we're talking about different things.

At least if $type is 'framed' and $t_mode is undefined, base.html
appears to be spit out as a wrapper around other templates files
(inserted at {{CONTENT}}), with the other templates selected according
to the print_form call in each sub $action.  For example,
manage_nameservers.html does not contaon a <head>...</head> or <body>
line, because manage_nameservers is inserted into base.html which
already contains a <head>...</head> and <body>.  The manage_nameservers
sub defines parts of %HTML which in turn get passed to sub print_form
which in turn passes them to get_content for translation within the
actual template content for assignment to $content which print_form
then prints.

Clear as mud?  Well, *I* didn't write it.  ;-)

Anyway, an hour of poking at the code has gotten it working.  I don't
know why it wasn't working before....  Must have been a type somewhere.
My screen font is small enough that colons sometimes look like semis.

p

On Mon, May 27, 2002 at 03:34:38PM -0400, Charles Daminato wrote:
> 
> Er ... uh... then I don't know.  My understanding is base.html is ignored,
> of course my understanding could very well be false and misleading *heh*
> 
> Charles Daminato
> OpenSRS Product Manager
> Tucows Inc. - [EMAIL PROTECTED]
> 
> > -----Original Message-----
> > From: Paul Chvostek [mailto:[EMAIL PROTECTED]]
> > Sent: May 27, 2002 3:19 PM
> > To: Charles Daminato
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: passing $action to %HTML in manage.cgi
> >
> >
> >
> > But Chuck...
> >
> > The idea is to have the javascript: link include the current $action.
> >
> > If print_form simply does a "$HTML->{ACTION} = $action;" some time
> > before get_content is called, then {{ACTION}} inside *ANY* template
> > file should be rewritten according to the value of the global variable
> > $action, shouldn't it?  The get_content function doesn't discriminate.
> >
> > p
> >
> > On Mon, May 27, 2002 at 02:55:11PM -0400, Charles Daminato wrote:
> > >
> > > I believe the print_form doesn't do anything significant with
> > base.html, and
> > > if that's where you have the {{ACTION}} piece then it won't get
> > parsed and
> > > changed (I believe)
> > >
> > > Charles Daminato
> > > OpenSRS Product Manager
> > > Tucows Inc. - [EMAIL PROTECTED]
> > >
> > > > -----Original Message-----
> > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> > > > Behalf Of Paul Chvostek
> > > > Sent: May 27, 2002 2:43 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: passing $action to %HTML in manage.cgi
> > > >
> > > >
> > > >
> > > > I'm trying to add context sensitive help to manage.cgi, to go
> > along with
> > > > a number of other UI modifications I've made.
> > > >
> > > > The changes I've done include stuff added to
> > templates/manage/base.html;
> > > >
> > > >  <script language="JavaScript">
> > > >   function popuphelp(item) {
> > > >    var helpwindow=window.open("/admin/popuphelp.php?item=" +
> > > > item,"help","width=400,height=400,scrollbars=yes,dependent=yes");
> > > >   }
> > > >  </script>
> > > > ... ... ...
> > > >  <tr>
> > > >   <td><table width="100%" border=0 cellspacing=0 cellpadding=0><tr>
> > > >    <td align=left bgcolor=d0d0d0 nowrap><font face="verdana,
> > > > arial" size=1>&nbsp;{{TOP_NAVBAR}}</font></td>
> > > >    <td align=right bgcolor=d0d0d0><a
> > > > href="javascript:popuphelp('osrs/{{ACTION}}')">Help</a>&nbsp;</td>
> > > >   </tr></table></td>
> > > >  </tr>
> > > >
> > > > along with some changes to manage.cgi which are *supposed* to popupate
> > > > $HTML{ACTION} with the value of $action.  But somewhere the variable
> > > > content is getting lost, and I'm sure I'm missing something obvious.
> > > > I have added:
> > > >
> > > >         $HTML->{ACTION} = $action;
> > > >
> > > > to manage.cgi's sub print_form.  The idea is that the content of the
> > > > javascript popuphelp call will be populated by whatever
> > section we happen
> > > > to be in, allowing the help to be customized for the $action in play.
> > > >
> > > > I was thinking that since $action is defined globally, it should be
> > > > available inside print_form.  What am I doing wrong?  Am I missing
> > > > something critical about the way %HTML is supposed to work?
> > > >
> > > > This stuff lives at http://www.it.ca/domain/manage.cgi in case anyone
> > > > wants to take a look from the user's perspective.
> > > >
> > > > Thanks.  :)
> > > >
> > > > --
> > > >   Paul Chvostek
> > <[EMAIL PROTECTED]>
> > > >   Operations / Development / Abuse / Whatever       vox: +1
> > 416 598-0000
> > > >   it.canada
> http://www.it.ca/
> > >
> 
> --
>   Paul Chvostek                                             <[EMAIL PROTECTED]>
>   Operations / Development / Abuse / Whatever       vox: +1 416 598-0000
>   it.canada                                            http://www.it.ca/

-- 
  Paul Chvostek                                             <[EMAIL PROTECTED]>
  Operations / Development / Abuse / Whatever       vox: +1 416 598-0000
  it.canada                                            http://www.it.ca/

Reply via email to