• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

[How-To] Create New Help Menus

Anyone know what I would need to set so I could do something like this:

example.com/help/advertising/additional-page/
or
example.com/help/additional-page/advertising
To do along with something like this:
PHP:
public function actionAdditionalPage()
    {
        // Get the page from the url
        $current_url_param = $this->_input->filterSingle('help_page_name', XenForo_Input::STRING); // Outputs: advertising
        // Template name
        $current_url_param_template = 'help_' . $current_url_param; // Outputs: help_advertising
        // Class name
        $current_url_param_class = 'XenForo_ViewPublic_Help_' .ucfirst($current_url_param); // Outputs: XenForo_ViewPublic_Help_Advertising
 
        // return template that should be displayed
        return $this->_getWrapper($current_url_param,
                    $this->responseView( $current_url_param_class, $current_url_param_template)); // Returns help_advertising template view
 
    }
This would take the advertising part of the url and output the correct template and class info.

Instead of coding every page action this would allow me to specify it else where and remove the dependency on creating a new action each time. I *should* be able to do it, just not sure on the syntax within xF.
 
Agreed, someone needs to expand that initial development further...

Many are hoping XF do this at the core eventually, by taking creation and editing to the frontend for pages, help pages, etc...
 
Thanks Anthony. I've seen and looked at your mod. What I basically want to do is improve that so an admin doesn't have to make those code edits and just needs to create the links and templates.
Added more comments to my first post to make the intention a little clearer.
 
Agreed, someone needs to expand that initial development further...

Many are hoping XF do this at the core eventually, by taking creation and editing to the frontend for pages, help pages, etc...
That would make sense. I know it's possible, just not sure what the steps are at the moment. Just trying to get a handle on all the good plugin tools in xF.
 
Top Bottom