thread
Last updated Apr 21st, 2019 | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$287 per month—let's make that $500!
Learn moreThe Thread (thread/index) controller is the one that shows an entire thread of posts to the user.
Basic Information¶
Since Version | 1.0 |
---|---|
Controller File | controllers/web/thread/index.class.php |
Controller Class Name | DiscussThreadController |
Controller Template | pages/thread/index.tpl |
Manifest Name | thread/index |
Options¶
If you don't know what the manifest is, please go back to the Getting Started document. The options below need to go into the "board" options array of the manifest.
Key | Default | Description |
---|---|---|
showPosts | true | To show posts.. you'll want this enabled. Posts go into [[+posts]] |
limit | 10 | Amount of posts per page |
discuss.post_sort_dir | ASC | The sort order for posts: ASC or DESC |
sortAnswerFirst | false | If enabled, Q&A threads will sort posts marked as answer on top. |
postAttachmentRowTpl | post/disPostAttachment | Chunk to wrap each attachment in. |
postTpl | post/disThreadPost | The chunk to wrap individual posts in. |
rowCls | dis-post | A class to add to the post row |
childrenCls | dis-board-post | |
actionLinkTpl | disActionLink | Tpl chunk for the action links. |
rowSeparator | line break | separator to use between rows |
showViewing | Show the readers based on sessions. Makes the [[+readers]] placeholder available. |
|
showBreadcrumbs | Show breadcrumbs on this controller. | |
showTitleInBreadcrumbs | ||
showPaginationIfOnePage | true | Wether 1 page pagination should show up or not. |
Controller Template¶
System Events¶
OnDiscussRenderThread¶
All currently set placeholders are available through the $placeholders array. The return value or $modx->event->output() value is expected to be an array of placeholders to override. Using a plugin on this event is the only way to put a value in the top, bottom, aboveThread and belowThread placeholders.
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$287 per month—let's make that $500!
Learn more