2012-10-29 3 views
0

두 매크로가 있다고 가정 해 봅시다. 하나는 다른 매크로에 중첩되어 있습니다.Freemarker - 중첩 된 매크로에 param 전달

[#macro testNestingTOP id] 
    [#nested] 
[/#macro] 

[#macro testNesting] 
    id: ${id} 
[/#macro] 

사용 :

어떻게 testNesting 매크로에서 아이디 PARAM의 값을 검색 할 수 있습니까?

[@testNestingTOP id='SOME VALUE'] 
 [@testNesting /] 
[/@testNestingTOP] 

답변

0

추가 내면의 매크로 속성과 그것에 대한 값으로 ID를 전달은

[@testNesting innerID ] 
//code 
[@testNesting /] 

[@testNestingTOP id='SOME VALUE'] 
    //code 
    [@testNesting innerID=id/] 
    //code 
[/@testNestingTOP] 

나는이

을 도울 수 있으면 좋겠다
관련 문제