首页 文章

冷融合和模板路径

提问于
浏览
0

我在现场环境中工作,无法改变 .

我正在尝试 Build 一个特殊的开发环境,这样我就不会因为测试代码而改变这么多路径 .

目前,主页面使用cfincude模板标签调用大量其他cfm页面 .

我已将页面移动到单独的文件夹以进行清理 .

在我尝试创建开发环境时 . 我创建了一个cfm页面,它只是设置模板的路径 .

includes.cfm <!--set for dev contactinformation page--> <cfset CIP = "include/dev/mh/MarContactInformationIncUpdate.cfm">

这是我调用includes.cfm页面的主页面

<cfset ContactMainPage = "MarMgt.cfm">
<cfparam name="CIP" default="MarContactInformationInc.cfm">
<cfif LocalAdmin neq 1>
    <!--- If not an admin don't let the user use these variables --->
    <cfset CIP = "MarContactInformationInc.cfm">
</cfif>

<cfif localuserid eq 1868>

    <!--- <cfinclude template="include/dev/mh/includes.cfm"> --->

</cfif>


<cfsavecontent variable="MainContent">
    <table cellpadding="3" cellspacing="0">
                <cfinclude template= "include/mar/headerMenu.cfm">
        <cfif IsDefined("message")>
            <tr>
                <td  align="center" class="AlertMessage"><cfoutput>#message#</cfoutput></td>
            </tr>
        </cfif>
        <tr>
            <td valign="top">
            <!--- Information Page Sections --->

            <!--- Displays callbacks that have time in which they need to take care of. --->
            <cfinclude template="include/mar/CallTimeAlert.cfm">

            <table cellpadding="0" cellspacing="0">

    </cfif>

它目前被注释掉,以便在我处理其他一些事情时显示页面 . 但是,每当我取消评论该行时

<!--- <cfinclude template="include/dev/mh/includes.cfm"> --->

然后错误表明它找不到模板

<cfinclude template="include/mar/CallTimeAlert.cfm">

我知道路径是正确的 . 我错过了什么?

谢谢 .

1 回答

  • 0

    我发现这个问题是由于相对路径造成的 .

    虽然我正确引用了所有路径,但是在包含的页面中设置的路径具有不正确的路径 .

    我的工作是在application.cfc中声明一个路径 .

    谢谢你的帮助 .

相关问题