Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cfmodule / custom tags

Status
Not open for further replies.

silverbeetle

Technical User
May 7, 2001
6
AU
hi all

i'm trying to use a few simple custom tags in my project but only seem to be getting headaches from them...

i can get them working fine locally, but as soon as i upload them to my site i have problems with mappings because i don't have access to the administrator to create my own.

I was using cfmodule to use custom tags with a root relative path address so my code can be moved and re-used easily. Does anyone have any suggestions as to how i can achieve this without using relative pathing or is it not possible without having mappings set up?

This is my cfmodule code if it matters:

<cfmodule Template=&quot;/customtags/dsp_tabletitle.cfm&quot; tabletitle=&quot;Add a new item&quot;>

Thanks, i'm probably going about this all wrong so please enlighten me ;)

Chris ------------------
 
Hey Chris,

I use custom tags a lot in a very similar manner to what you describe. I'm not aware of any way around your problem unless you want to call your custom tags relative to the current directory. If your code resides in a single directory, you could create a custom tags directory called &quot;tags&quot; and call them like this:

<cfmodule template=&quot;tags/myTag.cfm&quot;.....>

Since this will not work for instances where you have code in different directories, I would suggest contacting your server admin and just have them add a mapping for you as this would be the easiest solution. I would also suggest creating a variable in your application.cfm file to hold the custom tag main mapping and call your tags like this:

<cfmodule template=&quot;#mainRoot#myTag.cfm&quot;>

with this line in your application.cfm file:

<cfset mainRoot=&quot;/customTags/&quot;>

This way you can easily move the code to different servers and just update your mapping in one place.

Hope this helps,
GJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top