Hi Michael,

You can just use a single template, and pass it a variable.  You can pass
the variable in a number of ways, but in the URL is easiest at first.

So you might build a template showItem.cfm

You call it like this:
http://server/cfdocs/showItem.cfm?item=3

Inside your showItem.cfm, you can use the variable, possibly like this:
<CFQUERY NAME=Item DATASOURCE=mydatabase>
        SELECT * FROM ItemsTable
        WHERE ItemID = #URL.item#
</CFQUERY>

That's a VERY rough idea of how it all works.  It sounds like you should get
hold of one of Ben Forta's books, and I would STRONGLY suggest that you get
the new FuseBox book from secretagents.com and other places.  It explains
how to go about building applications with minimum fuss, and maximum result.
Fantastic.

Best of luck,

Lee (Bjork) Borkman
http://bjork.net ColdFusion Tags by Bjork


-----Original Message-----
From: Michael Wilson [mailto:[EMAIL PROTECTED]]
What I have is a list of items split into 5 categories. What I need is to be
able to create 5 separate navigation links to point to pages that list these
items. Should I create 5 different CF Templates using the Where x=x clause
and have my links point to the appropriate template or is there a (more
efficient) way to create a single template that will know which category to
return based on a URL variable or something?


IMPORTANT NOTICE:
This e-mail and any attachment to it is intended only to be read or used by
the named addressee.  It is confidential and may contain legally privileged
information.  No confidentiality or privilege is waived or lost by any
mistaken transmission to you.  If you receive this e-mail in error, please
immediately delete it from your system and notify the sender.  You must not
disclose, copy or use any part of this e-mail if you are not the intended
recipient.  The RTA is not responsible for any unauthorised alterations to
this e-mail or attachment to it.  
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]
  • RE: BORKMAN Lee
    • RE: Michael Wilson

Reply via email to