data:view.isPage
data:view.isPage
is a data XML template or theme used to determine the current page being displayed is a static page
data:view.isPage
can be used and are available throughout the XML theme.
The given value data:view.isPage
true
If you are on a static pagefalse
If not in a static page
Data Type |
boolean
|
---|---|
The Type Of Gadget |
Global
|
Widget versi |
1
2
|
Layout versi |
1
2
3
|
Standard Usage
data:view.isPage
<data:view.isPage/>
<b:eval expr='data:view.isPage'/>
Examples of Use
Condition if the current page is a static page
<b:if cond='data:view.isPage'>
...
</b:if>
Condition if the current page is not in a static page
<b:if cond='!data:view.isPage'>
...
</b:if>
The conditions are right and wrong
<b:if cond='data:view.isPage'>
...
<b:else/>
...
</b:if>
Some conditions
<b:if cond='data:view.isPost or data:view.isPage'>
...
</b:if>
Examples are used to create the attribute (<b:attr>
)
<div>
<b:attr cond='data:view.isPage' name='class' value='post'/>
</div>
HTML rendering results when on the article page
<div class="post">
...
</div>
The example used to add a class name (<b:class>
)
<div class="post-body">
<b:class cond='data:view.isPage' name='static'/>
</div>
HTML rendering results when on the article page
<div class="post-body static">
...
</div>
Congratulations to create and hopefully useful