Custom XenForo ViewPublic - Account

Adam K M

Active member
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.
 
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';
 
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.webp
You can see at the bottom of this thumbnail "Guild Area" is the page I'm trying to create.
 
Back
Top Bottom