xml - Blogger Page Layouts depending on Page Type -
hello everyone? new on here , hope guys can me out problem have. i'm creating blogger template , wanna show post's first image, excerpt , read more button on home page. have succeeded in doing that. problem nothing shows when try show posts heading, , entire post content on post page. please me out
<b:includable id='main'> <!-- return on home page --> <b:if cond='data:blog.pagetype == "index"'> <b:loop var='i' values='data:posts'> <!-- post tile --> <h2><data:i.title/></h2> <!-- if there image or images in post, first 1 --> <b:if cond='data:i.firstimageurl'> <img expr:src ="data:i.firstimageurl" expr:alt="data:post.title"/><br/> </b:if> <!-- snippet of post --> <data:i.snippet /><br/> <!-- display readmore button --> <a expr:href='data:i.url'><button>read more</button></a> </b:loop> </b:if> <!-- return on item/posts page --> <b:if cond='data:blog.pagetype == "item"'> <h3><data:post.title/></h3> <data:post.body/> </b:if> </b:includable> </b:widget>
nothing shows on item page
loop
post missing item
page. try code
<!-- return on item/posts page --> <b:if cond='data:blog.pagetype == "item"'> <b:loop var='i' values='data:posts'> <h3><data:i.title/></h3> <data:i.body/> </b:loop> </b:if>
Comments
Post a Comment