Defining Custom tag Paths in Code

2003-07-06 Thread Don
If I understand your question correctly, that is, to let all applications under one 
server access the same custom tag / module, then, use DOT NOTATION to call the module 
is the way to go, for instance, cfmodule name=UtilityComponents.utility 
Attributes.A=1 Attributes.B='abc' ...
(where UtilityComponents is a directory under CustomTags directory of your CF|CFMX 
installation).

Li, Chunshen (Don)
Baltimore, MD

http://68.32.61.40/datadata/dataman.cfm
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Defining Custom tag Paths in Code

2003-07-04 Thread Sean
Can it be done?

Shared server model - trying to avoid sandbox/security issues with multiple custom 
path mappings - can I define the custom tag paths in code? Anybody know the syntax off 
hand?

Cheers
Sean
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: Defining Custom tag Paths in Code

2003-07-04 Thread Massimo Foti
 Shared server model 

Any specific reason for avoiding cfmodule or, with CF MX, cfimport?


Massimo Foti
Certified Dreamweaver MX Developer
Certified Advanced ColdFusion MX Developer
http://www.massimocorner.com/



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: Defining Custom tag Paths in Code

2003-07-04 Thread Matthew Walker
Well in CFMX you can use cfimport to map a folder of tags onto a prefix,
e.g. stringlib:striphtml ...  . The downside is that it has to be used at
the top of each file in which you want to use custom tags. I think it's
still worth it though -- you get used to the lines of cfimport tags. And it
encourages you to be a bit more organised about your custom tags.

Another thing you can do is put the path to your tag folder in a variable
e.g. ../../../../customtags/ then put that in the cfmodule. Even better is
to note that generally all servers (even shared) will have the / mapping
set up. You can use that to set a variable for the path that will work from
any location within your site - you just need to know the name of the folder
your site lives in (which you can get from gettemplatepath() ).

Matthew Walker
Electric Sheep Web
http://www.electricsheep.co.nz/

- Original Message - 
From: Sean [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Friday, July 04, 2003 7:41 PM
Subject: Defining Custom tag Paths in Code


 Can it be done?

 Shared server model - trying to avoid sandbox/security issues with
multiple custom path mappings - can I define the custom tag paths in code?
Anybody know the syntax off hand?

 Cheers
 Sean
 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: Defining Custom tag Paths in Code

2003-07-04 Thread S . Isaac Dealey
You can also use a UDF to get relative paths to an absolute file path to call custom 
tags... Check out the Tapestry API in my sig or the getRelative() function from 
cflig.org

http://www.cflib.org/udf.cfm?ID=837

It's the same function... In Tapestry relative paths to these locations are cached in 
the application scope for efficiency (since they're not going to change... ever 
really), iirc the version of this function in the Tapestry API opensource project (in 
my sig) and on cflib.org uses the request scope which is a bit less efficient, but is 
done that way to avoid locking issues on CF5... If you're on cfmx you can just replace 
request with application and all should be well. :)

I'd create an additional UDF to get a relative path to your custom tags directory like 
this: 

cfscript
  function tag(tagname) {
return request.tapi.getRelative(request.customtagsdir  /  tagname); 
  }
/cfscript

Then calling a custom tag will look like this: 

cfmodule template=#request.tapi.tag('mytag')# blah blah... 

If you put the tapi call in the application.cfm then you'll have this available to you 
in every template in your application, so unlike cfimport you won't have to keep 
initializing it in each template where you need it. 

This is how I've avoided using cfserver mappings or cfimport in my own applications 
and it's worked well for me thus far.

hth 

s. isaac dealey972-490-6624

new epoch  http://www.turnkey.to

lead architect, tapestry cms   http://products.turnkey.to

tapestry api is opensource http://www.turnkey.to/tapi

certified advanced coldfusion 5 developer
http://www.macromedia.com/v1/handlers/index.cfm?ID=21816



 Well in CFMX you can use cfimport to map a folder of tags
 onto a prefix,
 e.g. stringlib:striphtml ...  . The downside is that it
 has to be used at
 the top of each file in which you want to use custom tags.
 I think it's
 still worth it though -- you get used to the lines of
 cfimport tags. And it
 encourages you to be a bit more organised about your
 custom tags.

 Another thing you can do is put the path to your tag
 folder in a variable
 e.g. ../../../../customtags/ then put that in the
 cfmodule. Even better is
 to note that generally all servers (even shared) will have
 the / mapping
 set up. You can use that to set a variable for the path
 that will work from
 any location within your site - you just need to know the
 name of the folder
 your site lives in (which you can get from
 gettemplatepath() ).

 Matthew Walker
 Electric Sheep Web
 http://www.electricsheep.co.nz/

 - Original Message -
 From: Sean [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Friday, July 04, 2003 7:41 PM
 Subject: Defining Custom tag Paths in Code


 Can it be done?

 Shared server model - trying to avoid sandbox/security
 issues with
 multiple custom path mappings - can I define the custom
 tag paths in code?
 Anybody know the syntax off hand?

 Cheers
 Sean

 ~~
 ~~~|
 Archives:
 http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
 Subscription: http://www.houseoffusion.com/cf_lists/index.
 cfm?method=subscribeforumid=4
 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

 This list and all House of Fusion resources hosted by
 CFHosting.com. The place for dependable ColdFusion
 Hosting.
 http://www.cfhosting.com

   Unsubscribe: http://www.houseoffusion.com/cf_lists/uns
   ubscribe.cfm?user=633.558.4




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4