> I've got a page set up that seems to be causing component issues. > > The page is called index.cfm > There's a header and footer that are called from a Custom tag > Components are called in index,cfm > > A return variable is needed in the footer from a component > called in index.cfm > > 1) even with the Custom Tag aren't the templates processed > sequentially (header, index, footer)
Yes. > 2) Shouldn't the return values be in memory and available to any > template? Each file - your page, the component, the custom tag - has its own local scope. If you want to access a variable from within your custom tag, and that variable is in the page that calls the custom tag, you have three options: 1. Use the Caller scope to refer to it from within the custom tag. This is usually not the optimal choice, because it creates a tight coupling between your page and the custom tag. 2. Pass the value to the custom tag as an attribute. This is usually the best choice. 3. Place the variable in a scope that's equally accessible from both files. The Request scope was created explicitly for this purpose. Other choices include Client, Session, Application and Server scopes. Usually, this is not as good a choice as passing the value to the custom tag, but since custom tags can't really return values without a hack of sorts, the Request scope can be very convenient if you have multiple levels of nesting. > 3) Why won't the variable display in the footer.cfm? Because it's not in a scope that both files can see the same way. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Training: Adobe/Google/Paperthin Certified Partners http://training.figleaf.com/ WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers! http://www.webmaniacsconference.com/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299079 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4