Solved

How to get around restrictions on cfinclude not passing parameters?

Posted on 2006-11-06
3
746 Views
Last Modified: 2013-12-24
I am trying to automate the printing of several pages. Part of what I want to do is this:

<body>
<cfinclude template="/recipes/recipe_show.cfm?recID=5">
<p class="break"><br></p>
...
</body>

My problem is that the cfinclude, apparently, does not take parameters ... so how do I get the recipe ID to the recipe_show page?
0
Comment
Question by:alicia1234
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
aseusainc earned 250 total points
ID: 17886464
This should work:

<body>
<cfset recID=5>
<cfinclude template="/recipes/recipe_show.cfm">
<p class="break"><br></p>
...
</body>
0
 
LVL 7

Expert Comment

by:aseusainc
ID: 17886470
Just a pointer...Think of an include as if you cut and pasted the templates code directly into your main page instead of including it, not as some sort of external app.
0
 

Author Comment

by:alicia1234
ID: 17889832
Just a note ... I had to do this:

<cfset URL.recID = 5>
0

Featured Post

Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem to Eclipse 16 154
htaccess restrict subdomain 4 147
Web Site Hosting 10 102
setup wamp server for first time 2 117
In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question