Fuhrmann
OMG Member
- Joined
- Oct 27, 2011
- Messages
- 93
This tutorial will explain how to show a forum inside a page. I'll not explain why this, or why that, but all the code necessary is commented.
Step 1 - Create the page
To create a new page go to AdminCP -> Applications -> Node Tree -> Create New Page. Fill with this informations (or anything you want. The items with red is required to be exactly the same as I wrote in here, so this tutorial will work for you):
Tab - Basic Information
URL Portion:: showsaforum
Title: Showing a Forum
Description: This page shows a forum.
Parent Node: (root node)
Display Order: 1
Display in the node list: 1
Override user style choice: Unchecked
Tab - Page options
Template HTML:
Explaining: You'll maybe do not understand this now, but what we are doing is require the css for the thread listing, and inside a div we raw the parameter $forum. But this paremeter do not exists yet. It will be created inside a Callback that we will set for this page. The $forum paremeter consists in a rendered template.
Optional Components: Do not need to check anything.
Tab - PHP Callback
PHP Callback: ShowAForum:
howAForumInPage
Save it!
Step 1 - Create the page
To create a new page go to AdminCP -> Applications -> Node Tree -> Create New Page. Fill with this informations (or anything you want. The items with red is required to be exactly the same as I wrote in here, so this tutorial will work for you):
Tab - Basic Information
URL Portion:: showsaforum
Title: Showing a Forum
Description: This page shows a forum.
Parent Node: (root node)
Display Order: 1
Display in the node list: 1
Override user style choice: Unchecked
Tab - Page options
Template HTML:
Code:
<xen:require css="discussion_list.css" />
<div class="discussionList">
{xen:raw $forum}
</div>
Explaining: You'll maybe do not understand this now, but what we are doing is require the css for the thread listing, and inside a div we raw the parameter $forum. But this paremeter do not exists yet. It will be created inside a Callback that we will set for this page. The $forum paremeter consists in a rendered template.
Optional Components: Do not need to check anything.
Tab - PHP Callback
PHP Callback: ShowAForum:

Save it!