Thanks for your response Peter,
The applicationRoot is set for application 2 which is correct because
application 2 has views as well.
Basically, I sharing a module between multiple applications.
Is there a way to tell machii to use a different applicationRoot for the
views in the include file?
I have a work around, which is to create dummy page files in in
application 2 for the application 1 pages.
The dummy files all use cfinclude to pull the contents of the
application 1 pages.
I think machii should be able to handle this condition. Am I doing
something wrong?
Bill Peddy
Web Developer
ECS Team - ITS-EPA II -
Contractor
voice: (919) 541-1329
fax: (919) 541-3700
|------------>
| From: |
|------------>
>---------------------------------------------------------------------------------------------------------------------------------------|
|"Peter J. Farrell" <[email protected]>
|
>---------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To: |
|------------>
>---------------------------------------------------------------------------------------------------------------------------------------|
|[email protected]
|
>---------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date: |
|------------>
>---------------------------------------------------------------------------------------------------------------------------------------|
|01/06/2011 01:42 PM
|
>---------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject: |
|------------>
>---------------------------------------------------------------------------------------------------------------------------------------|
|Re: [Mach-II] Problem finding page-view files inside an included xml file
|
>---------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Sent by: |
|------------>
>---------------------------------------------------------------------------------------------------------------------------------------|
|[email protected]
|
>---------------------------------------------------------------------------------------------------------------------------------------|
* The exception message should have the path it tried to use for the
view page.
* What is your appRoot property set to?
* ./ does nothing in views because the path is always computed as
"/appRoot" + view path.
<cffunction name="getViewPath" access="public" returntype="string"
output="false"
hint="Gets a resolved view path by view name.">
<cfargument name="viewName" type="string" required="true"
hint="Name of the view path to get." />
<cfset var viewData = getView(arguments.viewName) />
<cfreturn viewData.appRoot & viewData.page />
</cffunction>
.pjf
[email protected] said the following on 01/06/2011 08:18 AM:
> Hey guys,
> I am trying to share an xml file between multiple applications.
> Using include, I am able to execute the events of the xml file in the
> second application, but I am receiving an error with the page-view
> files, saying it can't be found.
> The error has the directory structure of the second application when I
> want it to look in the first application's directory.
>
> <page-views>
> <page-view name="adminPage"
page="./views/Admin/adminPage.cfm" />
> <page-view name="admin.category.list"
> page="./views/Admin/Category/list.cfm" />
> <page-view name="admin.category.maint"
> page="./views/Admin/Category/maint.cfm" />
> <page-view name="admin.qa.list"
> page="./views/Admin/category/qa/list.cfm" />
> <page-view name="admin.qa.maint"
> page="./views/Admin/category/qa/maint.cfm" />
> </page-views>
>
> I know the "./" tells machii to look in current directory. When I
tried
> "/" to map to the root of our website, I received the same error with
> the directory structure of the second application in the error
message.
> How do you specify file locations in a page-view definition that will
> allow it to be referenced by multiple applications across a website?
>
>
>
>
> Bill Peddy
> Web Developer
> ECS Team - ITS-EPA II -
> Contractor
> voice: (919) 541-1329
> fax: (919) 541-3700
>
>
>
>
--
You received this message because you are subscribed to Mach-II for CFML
list.
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/mach-ii-for-coldfusion?hl=en
SVN: http://svn.mach-ii.com/machii/
Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/
--
You received this message because you are subscribed to Mach-II for CFML list.
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/mach-ii-for-coldfusion?hl=en
SVN: http://svn.mach-ii.com/machii/
Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/