2008-10-07 2 views
0
<div spry:region="ds1" spry:repeatchildren="ds1"> 
    <b spry:if=" '{title}'!='' "> 
    <!-- this is the first if --> 
    <a href="#" spry:if=" '{author}'!='' ">{author} 
     <!-- this is the second if --> 
    </a> 
    </b> 
</div> 



Spry 지역에서 조건이 두 개인 경우

if(x==y && i>j) 

영역에 간단한 방법이 있는지 궁금합니다. spry docs (labs.adobe.com/technologies/spry/)에서 정보를 찾을 수 없습니다.

답변

1

spry:if 속성 내부의 구문은, 자바 스크립트입니다 찾을 수 없습니다 당신은 함수를 호출 할 수 있습니다 대신

spry:if="myFunc();" 

와 함수에서 결과로 부울 값을 반환

function myfunc() 
{ 
//do somethings ; 
if(...) 
return true; 
else 
return false; 
} 
1

: 나는 활발한 문서의 정보 (labs.adobe.com/technologies/spry/)는 &&을 사용할 수 있도록

0

일반적으로 내가 좋아한다.

<div spry:region="ds1" spry:repeatchildren="ds1"> 
    <b spry:if=" '{ds1::title}'!='' && '{ds1::author}'!=''"> 
     <a href="#">{author}</a> 
    </b> 
</div>