지금까지 여러 페이지를 테스트 한 결과, <CFHTMLHEAD>
을 사용하여 ColdFusion 11의 CFM 페이지에 CSS 또는 JavaScript를 추가하려고 시도 할 때마다 추가되지 않습니다 (CF8에서 올바르게 작동 함).CFHTMLHEAD가 ColdFusion 11에서 작동하지 않는 이유는 무엇입니까?
관리자> 서버 설정> 설정에서 최대 출력 버퍼 크기를 기본값 인 1,024KB에서 늘리지 만 시도한 모든 값 (2048KB, 4096KB 및 최대 999999KB까지)을 읽었습니다.) 나는 동일한 결과를 얻는다 - 내용은 페이지가로드 될 때 <HEAD>
태그에 포함되지 않는다.
누구도이 문제에 뛰어 들어 아직 해결책을 찾지 못했습니까?
코드 샘플 :
htmlhead.cfm :
<cfif NOT ThisTag.HasEndTag>
<cfthrow message="Missing end tag for custom tag htmlhead." type="HeadWrap" />
</cfif>
<cfif ThisTag.ExecutionMode is "End">
<cfhtmlhead text="#ThisTag.GeneratedContent#" />
<cfset ThisTag.GeneratedContent = "" />
</cfif>
index.cfm : CF11 아무것도가 전에 오는 cfhtmlhead를 호출을 사용하여 추가 한 내가 찾은
<cfsilent>
<!---
Data Retrieval, validation, etc. here
--->
<cf_htmlhead>
<style type="text/css">
tr.status-RETIRED td {
color: #800000;
}
tr.status-PENDING td {
color: #008000;
}
</style>
<script type="text/javascript">
$(function(){
$(".options-menu").mouseleave(function(e){
$(this).hide("fast");
})
$(".options-menu-link").mouseover(function(){
$(".options-menu").hide("fast");
$(".options-menu[data-sku='" + $(this).data("sku") + "']").show("fast");
}).click(function(e){
e.preventDefault();
});
});
</script>
</cf_htmlhead>
</cfsilent>
<!---
Custom Tag layout.cfm contains the DOCTYPE declaration, html, head (loads jquery, jquery-ui, css, etc.), and body tags with a header and footer for each page.
--->
<cf_layout>
<!--- Page Content Here (a form, a table, some divs, etc.) --->
</cf_layout>
오류 없음, 단지 결과가 없습니다? Repro case? –
@AdamCameron, 아니요, 오류는 없습니다. 페이지가로드되지만 소스의 HEAD를 보면 CFHTMLHEAD 태그 내에 코딩 된 스크립트 및 스타일 태그가 없어 페이지의 일부가 잘못 표시되거나 올바르게 작동하지 않습니다. –
좋아, 내 질문의 두 번째 (및 * 주 *) 부분 : repro case? IE : 당신이보고있는 것을 보여주는 몇 가지 코드를 제공하십시오. http://sscce.org/ –