Textpattern | PHP Cross Reference | Content Management Systems |
1 <!-- if there are comments, display them (note: example code below overrides the global preference setting for comments wrapping by stating 2 attributes of wraptag="" and break="", you are instead using ol and li tags below)... --> 3 <txp:if_comments> 4 5 <section id="comments-head"> 6 <h3> 7 <txp:text item="comments" /> 8 </h3> 9 <ol class="comments-list"> 10 11 <txp:comments wraptag="" break="li" /> <!-- links by default to form: 'comments.comment.txp' unless you specify a different form --> 12 13 <!-- if this is a comment preview, display it (but only if there is no error) --> 14 <txp:if_comments_preview> 15 <li> 16 <p id="cpreview"> 17 <txp:text item="press_preview_then_submit" /> 18 </p> 19 20 <!-- links by default to form: 'comments.comment.txp' unless you specify a different form --> 21 <txp:comments_preview wraptag="" /> 22 23 </li> 24 </txp:if_comments_preview> 25 26 </ol> 27 28 <!-- else if there are no comments yet and user is currently previewing comment, display it (but only if there is no error) --> 29 <txp:else /> 30 31 <txp:if_comments_preview> 32 <section id="comments-head"> 33 <h3> 34 <txp:text item="comments" /> 35 </h3> 36 <ol class="comments-list"> 37 <li> 38 <p id="cpreview"> 39 <txp:text item="press_preview_then_submit" /> 40 </p> 41 42 <!-- links by default to form: 'comments.comment.txp' unless you specify a different form --> 43 <txp:comments_preview wraptag="" /> 44 45 </li> 46 </ol> 47 48 <!-- else just display that there are simply no comments whatsoever :( ...but only if comments are allowed --> 49 <txp:else /> 50 51 <txp:if_comments_allowed> 52 <section id="comments-head"> 53 <h3> 54 <txp:text item="comments" /> 55 </h3> 56 <p> 57 <txp:text item="no_comments" /> 58 </p> 59 60 </txp:if_comments_allowed> 61 </txp:if_comments_preview> 62 </txp:if_comments> 63 64 <!-- next, if new comments are allowed for this article then display comment form --> 65 <txp:if_comments_allowed> 66 67 <section id="comments-form"> 68 69 <!-- comment invite text is taken for the article's comment invitation field on the 'write' screen --> 70 <h3> 71 <txp:comments_invite showcount="0" textonly="1" showalways="1" /> 72 </h3> 73 74 <!-- links by default to form: 'comment_form.comment.txp' unless you specify a different form --> 75 <txp:comments_form /> 76 77 </section> 78 79 <!-- else display a comments expired message ...but only if comments had previously been allowed --> 80 <txp:else /> 81 82 <txp:if_comments> 83 <p> 84 <strong> 85 <txp:text item="comments_expired" /> 86 </strong> 87 </p> 88 </txp:if_comments> 89 90 </txp:if_comments_allowed> 91 92 <!-- if a comments section was rendered above, close the tag --> 93 <txp:if_comments> 94 </section> 95 <txp:else /> 96 <txp:if_comments_allowed> 97 </section> 98 </txp:if_comments_allowed> 99 </txp:if_comments>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
title