Inside your /vhosts/admin.mydomain.com/htdocs/adminpages/Application.cfc place 
absolutely nothing but (check the path is correct)...

<cfinclude template="../../../mydomain.com/htdocs/Application.cfc">

I tested this just now, and it seemed to work for me. The methods will run 
themselves as usual. You can of course also use createObject() or cfinvoke if 
you want to call methods manually.

________________________________

        

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of David 
Harris
Sent: Thursday, 2 March 2006 9:46 a.m.
To: cfaussie
Subject: [cfaussie] Re: Application.cfc reuse


can you give an example of what you mean?
cfincluding in a CFC, or cfinclude the CFC?
i'd be interested to see how you have used that.
how do you call the functions either way?


Matthew Walker wrote:
> With Application.cfc you can also simply cfinclude it. However, it would 
> probably be more elegant to extend the main cfc.
>
> <cfcomponent extends="mydomain.com/htdocs/application"></cfcomponent>
>
> However, in doing this, you'll need some mapping in place probably, and I 
> think CF will choke on dots in folder names. I'd go with cfinclude.
>
> ________________________________
>
> Cabbage Tree Creative Ltd.
> Matthew Walker | web programmer
> Phone    +64 3 377 7544
> Email     [EMAIL PROTECTED]
> Web      www.cabbagetree.co.nz
>
>
> manage your own web site with Thrive - contact us to learn how!
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Gavin 
> Cooney
> Sent: Wednesday, 1 March 2006 6:31 p.m.
> To: [email protected]
> Subject: [cfaussie] Application.cfc reuse
>
>
> Hi all,
>
> quick question for you guys.
>
> I have an application on one domain (one vhost on my sever) and some
> administration pages for the same application.
>
> so the files might be in
>
> Main site:
> /vhosts/mydomain.com/htdocs/
> Admin site:
> /vhosts/admin.mydomain.com/htdocs/adminpages/
>
> My question is this:
>
> I have an Application.cfc in the main site root. I want to basically
> use the same Application.cfc in the admin site too. With an
> Application.cfm i could have just cfincluded the other application.cfm
> page/
> 
> What do i do here? What's best practice?
> 
> Cheers
> 
> Gav







--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---

Reply via email to