Outputs the comment form and initialises the JS configuration (window.Xcomm3xConfigs, one entry per block).
Important: the snippet must be on the same page as XcommThread. It is the one that passes JS all chunk names for AJAX rendering of new and edited comments.
Parameters
| Parameter | Default | Description |
|---|---|---|
resource | [[*id]] | ID of the resource the comments belong to |
block_key | default | Block key (allows several threads on one page) |
tpl | xcomm3x_post_form | Comment form chunk |
outerTpl | (none) | Wrapper chunk around the form. Placeholders: [[+content]], [[+resource_id]], [[+block_key]] |
guestFieldsTpl | xcomm3x_guest_fields | Name/email fields chunk for guests |
replyFormTpl | xcomm3x_reply_form | Reply form chunk (loaded via AJAX when “Reply” is clicked) |
editFormTpl | xcomm3x_edit_form | Edit form chunk (loaded via AJAX when “Edit” is clicked) |
commentTpl | xcomm3x_comment_item | Comment chunk for AJAX rendering after posting/editing |
replyBtnTpl | xcomm3x_reply_btn | “Reply” button chunk for AJAX rendering |
editBtnTpl | xcomm3x_edit_btn | “Edit” button chunk for AJAX rendering |
deleteBtnTpl | xcomm3x_delete_btn | “Delete” button chunk for AJAX rendering |
Call — default theme
[[Xcomm3x]]
Call — Bootstrap 5
[[!Xcomm3x?
&tpl=`xcomm3x_bs5_post_form`
&guestFieldsTpl=`xcomm3x_bs5_guest_fields`
&replyFormTpl=`xcomm3x_bs5_reply_form`
&editFormTpl=`xcomm3x_bs5_edit_form`
&commentTpl=`xcomm3x_bs5_comment_item`
&replyBtnTpl=`xcomm3x_bs5_reply_btn`
&editBtnTpl=`xcomm3x_bs5_edit_btn`
&deleteBtnTpl=`xcomm3x_bs5_delete_btn`
]]
Call — UIKit 3
[[!Xcomm3x?
&tpl=`xcomm3x_uk3_post_form`
&guestFieldsTpl=`xcomm3x_uk3_guest_fields`
&replyFormTpl=`xcomm3x_uk3_reply_form`
&editFormTpl=`xcomm3x_uk3_edit_form`
&commentTpl=`xcomm3x_uk3_comment_item`
&replyBtnTpl=`xcomm3x_uk3_reply_btn`
&editBtnTpl=`xcomm3x_uk3_edit_btn`
&deleteBtnTpl=`xcomm3x_uk3_delete_btn`
]]