[thelist] CF: Fusebox question

Bruce Heerssen bheerssen at iecommerce.net
Tue Oct 24 11:34:33 CDT 2000


"Frank" <framar at interlog.com> wrote in message
news:p05001900b61b20205d13@[24.43.66.191]...
...<snip>
> Every fuseaction is either cfincluded or cfmoduled into the index
> page though a case statement. Why is it that a page that is cfmoduled
> cannot access the datasource wheras the page that is cfincluded can?
>

Cfmodule causes the included file to be processed in it's own memory space,
as though it were an entirely separate template. Variables, such as your
datasource variable, are not shared with the parent template and vica-versa,
unless they are shared scope variables such as session or application
variables. Cfinclude files are processed in the same memory space as the
parent template, as though the parent template and the child template were
one big template. That way, they share all variables.

Does that make sense?

If you really need to use cfmodule, put your datasource variable in the
application scope. That way, all templates within that directory can access
the variable regardless of how they are called.

hope that helps

    -- Bruce






More information about the thelist mailing list