Hi All,
Here are my observations on CFMODULE - TEMPLATE
attribute:

Assumption:
1. The directory structure is
C:\Inetpub\wwwroot\App\Index    root of the application
C:\Inetpub\wwwroot\App\CommonFiles\ common files
folder
C:\Inetpub\wwwroot\App\BusinessRuleLogic\ logic for
business rules

2. The following mappings have been created in CF
Administrator
CommonFiles maps to
"C:\Inetpub\wwwroot\App\CommonFiles\"
BusinessRuleLogic maps to
"C:\Inetpub\wwwroot\App\BusinessRuleLogic\"

Process:
The main page: C:\Inetpub\wwwroot\App\Index\index.cfm 
makes a call to:
C:\Inetpub\wwwroot\App\CommonFiles\ValidateUser.cfm
which calls:
C:\Inetpub\wwwroot\App\BusinessRuleLogic\IsValidData.cfm

This call can be made as

Method 1: Mapping Approach: Uses the mapping as
defined in CFAdmin
<CFMODULE TEMPLATE="/CommonFiles/ValidateUser.cfm">

<CFMODULE
TEMPLATE="/BusinessRuleLogic/IsValidData.cfm">

or 
Method 2: DoubleDot Aproach: Does not use the mapping
defined in CFAdmin
<CFMODULE TEMPLATE="../CommonFiles/ValidateUser.cfm">

<CFMODULE
TEMPLATE="../BusinessRuleLogic/IsValidData.cfm">

A point to note here is that 'Method 2' does not refer
to the mapping. This means that even if the mapping
does not exist the call ('Method 2') will still work.


Question:
Is it ok to use the '..' (DoubleDot approach) in
method 2 for calling the templates?

The advantage is that take out the DoubleDot and the
mappings startworking.

Now, if you want to know the reason for using this
approach, read on.....  but do let me know if using
the DoubleDot is fine.


(I am planning to use this method to help developers
of a large intranet application be able to test their
work independently of other developers and at the same
time use the same CF Server. In this application
end-user testing runs in parallel to the development
process, meaning that a developer writes a function,
then tests it at his end and later copies his work to
another folder. The end-users are testing the
application from this folder and not the developers
folder.

In short, the DoubleDot approach helps bcoz the
developer can test his code by putting in the dot-dot.
After testing is complete the DoubleDot is removed and
then the file is transferred to the end-user testing
directory. A better way of doing this is by defining a
hidden field or a request variable that stores the dot
and I have figured out an better way of doing it)

Kedar Desai
Technical Manager
Differential Technologies
Fairfax, VA

__________________________________________________
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
http://photos.yahoo.com/
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to