Thank you Peter, Tom and Patrick (Nice name :) )  I am off to play with
Upvars and get this thing working.. ;)

the help is appreciated :)

--
  Patrick Spence <[EMAIL PROTECTED]>
  www.RandomRamblings.com
  www.Ariven.com
  www.ReturnOurRights.org
----- Original Message -----
From: "Patrick Kelly" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 12, 2002 4:28 PM
Subject: Re: [AOLSERVER] ns_register_adptag question


> At http://www.pk67.com/simple-templates/ I have very out-of-date
> downloads and docs for my "simple templates".  In particular, you can
> checkout the evaluate_tag_params proc in
>
>     http://www.pk67.com/simple-templates/current/simple-templates.tcl.txt
>
> to support this syntax:
>
>     <wrap file="$wrapper_filename"> ... </wrap>
>
> All my templating stuff does evil upvars and uplevels to make sure
> everything is evaluated at the same scope.  This way I can do:
>
>     <% set my_variable "fred" %>
>     <wrap file="$wfile">
>         <wrap file="innerfile.html">
>             <%= $my_variable %>
>         </wrap>
>     </wrap>
>
>
>
> On Tue, Mar 12, 2002 at 02:50:31PM -0700, Patrick Spence wrote:
> > I am hoping someone else has more experience with the register adptag
than I
> > do.. :)
> >
> > I have a tag I have registered this way:
> >
> > ns_register_adptag "wrap" "/wrap" wraptemplate_proc
> > proc wraptemplate_proc {string tagset} {
> >     set name [ns_set iget $tagset name]
> >     set keywords [ns_set iget $tagset keywords]
> >     set title [ns_set iget $tagset title]
> >     set affiliatename [ns_adp_parse [ns_set iget $tagset affiliatename]]
> >     set affiliate [ns_adp_parse [ns_set iget $tagset affiliate]]
> >
> > ... some processing
> >
> >     return [ns_adp_parse -string "$prehtml$string$posthtml"]
> > }
> >
> > In the ADP that I have this called in, I am calling it this way:
> >
> > <wrap
> >     name="main"
> >     title="Test of Template"
> >     description="This is a test"
> >     affiliatename="<%=$affiliatename%>"
> >     affiliate="<%=$affiliate%>"
> >
> > This is a test! <br>
> >     affiliatename="<%=$affiliatename%>" affiliate="<%=$affiliate%>"
> > </wrap>
> >
> > What I am trying to do is pass variables in to the registered tag.  The
> > variables exist and contain data before and after the registered tag,
but
> > dont pass into the tag like I would like it to.  As far as I can tell
the
> > data is not getting handed into the tag at all, which eliminates the use
of
> > a registered adp tag for convenience on this project (sigh)... I have
tried
> > putting the tag into a ns_puts [ns_adp_parse "tag here"]  construct, I
have
> > tried ns_adp_parse in the <% %> brackets on the call to the wrap tag to
no
> > avail...  the adp tag works great other than this minor/major bobble..
> >
> > Does anyone have any ideas here?
> >
> > Thanks much in advance.
> >
> > --
> >  Patrick Spence
>
> --
> Patrick Kelly -- http://www.pk67.com/patrick.html

Reply via email to