RE: [Phplib-users] Template Bugs..
Brought to you by:
nhruby,
richardarcher
|
From: Mike G. <mi...@op...> - 2002-05-13 20:44:17
|
Hello Nathan & Layne,
Thanks to both of you, I think I've got the problem solved.. But I've
also got some other questions following your help..
On Mon, 2002-05-13 at 16:14, Layne Weathers wrote:
> > $this->template->set_var(array( 'SIDEBAR_LINKS' =>
> > $spotlightArticles ));
> FYI: If you are only setting one variable, you can send it as two arguments
> rather than creating an array and having set_var pull it back out of the
> array.
How would that look? Like this:
$this->template->set_var($spotlightArticles='SIDEBAR_LINKS');
That doesn't look right to me, but I can't think how else to do it..
> > $this->template->parse($template, "link_row", true);
> This should be:
> $this->template->parse("link_rows", "link_row", true);
Yup.. This was my major flaw.. Thanks! I tend to copy stuff and
sometimes end up copying the wrong stuff and trying to figure out why
the heck it isn't working..
On Mon, 2002-05-13 at 16:31, nathan r. hruby wrote:
> > $this->template->parse('SIDBAR', $template);
> > $articleLinks = $this->template->get('SIDBAR');
> > return $articleLinks;
> $this->template->parse('SIDBAR', $template, TRUE);
> return $this->template->get('SIDBAR');
> Note the addtional TRUE in parse().
I added that.. This just means that it appeands it if it already
exists, right?
> When in doubt, enabling debugging for
> template.inc, you get to see what's
> happening exactly at every step
Ok.. How do I enable template.inc debugging.. That would likely be
useful info..
Mike
--
Mike Gifford, OpenConcept Consulting, http://www.openconcept.ca
Open Source Web Applications for Social Change
New Site Launched: http://www.patmartin.org/
War is a poor chisel to carve out tomorrows. ML King, Jr.
|