Kick off the New Year with a revolutionary social media platform! New
Kick off the New Year with a revolutionary social media platform! This platform prioritizes user control and privacy . Personal information will not b…
- Threads
- 4
- Words
- 7471
Kick off the New Year with a revolutionary social media platform! This platform prioritizes user control and privacy . Personal information will not b…
The <b:include> is statement takes all the text/code/markup that exists in the <b:includable> tags and copies it into the part that calling the include statement.
<B:INCLUDE/>
<b:include cond='EXPRESSION'
data='DATA-ALIAS'
name='STRING1'/>
<B:INCLUDABLE>
<b:includable id='STRING1'
var='STRING'>
<!-- span Block -->
</b:includable>
THE INCLUDABLE
<b:includable id='list'>
<b:loop values='data:foo' var='item'>
<li>
<data:item/>
</li>
</b:loop>
</b:includable>
CALLING INCLUDABLE 'LIST' WITH DATA-ALIAS
<ol>
<b:include data='{ foo: ["Qux","Quux"] }' name='list'/>
<b:include data='{ foo: ["Corge","Graul"] }' name='list'/>
<b:include data='{ foo: ["Garply","Waldo"] }' name='list'/>
</ol>
RESULT
1. Qux
2. Quux
3. Corge
4. Graul
5. Garply
6. Waldo
With data-alias we can process multiple data with same format and get same result to avoid repeating typing same code again. The data with foo will be forwarded to <b:includable> tag and processed in <b:loop> tag with variable name item transform into <data:item/>.
THE INCLUDABLE WITH CHILD
<b:includable id='list' var='parent'>
<b:include data='parent' name='list2'/>
</b:includable>
<b:includable id='list2'>
<b:if cond='data:foo'>
<b:loop values='data:foo' var='item'>
<li>
<data:item/>
</li>
</b:loop>
<b:elseif cond='data:bar'/>
<ol>
<b:loop values='data:bar' var='item'>
<li><data:item/></li>
</b:loop>
</ol>
</b:if>
</b:includable>
CALLING INCLUDABLE 'LIST' WITH DIFFERENT DATA NAME
<ol>
<b:include data='{ foo: ["Qux","Quux"] }' name='list'/>
<b:include data='{ bar: ["Corge","Graul"] }' name='list'/>
<b:include data='{ foo: ["Garply","Waldo"] }' name='list'/>
</ol>
RESULT
1. Qux
2. Quux
1. Corge
2. Graul
3. Garply
4. Waldo
In this example, data with different name and various string forwarded to <b:includable> with a name 'list' and variable 'parent', transform into group data:parent and gave to next <b:includable> with the name 'list2'. Conditional Statement is there to test which group and process with matching statement.
Blogger has default inclusion that we can call to be used in our template. This are inclusions that are stored on the Blogger serverside. Mostly marked with prefix super in the inclusion. Other are The Common Inclusion, this inclusion can be installed anywhere except b:skin. The known inclusion present inside default tempate are:
<b:include name='all-head-content'/>
<b:include name='postMetadataJSON'/>
Forum rules
You can use English or Indonesian
image quote pre code