• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Custom XenForo ViewPublic - Account

Adam K M

Active member
#1
Hello,

I'm currently working on developing a custom page that can be found in the 'settings'/'personal details' area. I've figured out just about everything that I need to do, however, I am unfamiliar with the "Xenforo_ViewPublic_Account" php files, and how to make one of them render out my own template instead.

From looking at the PersonalDetails.php in the XenForo/ViewPublic/Account folder, maybe this is code that can be adapted to run my own custom template, account_templateName.
PHP:
<?php

class XenForo_ViewPublic_Account_PersonalDetails extends XenForo_ViewPublic_Base
{
    public function renderHtml()
    {
        $this->_params['aboutEditor'] = XenForo_ViewPublic_Helper_Editor::getEditorTemplate(
            $this, 'about', XenForo_Visitor::getInstance()->get('about')
        );
    }
}
Can someone please help me with this? Any pointers would be greatly appreciated.
 

Chris D

XenForo developer
Staff member
#2
Can you explain exactly what you're trying to do?

Basically this line added to that file will use a different template instead of account_personal_details:

PHP:
$this->_templateName = 'test';
 

Adam K M

Active member
#3
Can you explain exactly what you're trying to do?

Basically this line added to that file will use a different template instead of account_personal_details:

PHP:
$this->_templateName = 'test';
I am trying to add my own page to the "Your Account" area of the forums. I've added the menu item, I just need it to work.
progress.PNG
You can see at the bottom of this thumbnail "Guild Area" is the page I'm trying to create.