{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Client Area Output","description":"Developer documentation for the WHMCS API — the","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"client-area-output","__idx":0},"children":["Client Area Output"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Addon Modules also support generating client area output."," ","This is done with the use of an ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["_clientarea"]}," function within the module."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The functionality allows for modules to return output in the form of template files."," ","The template files are stored within the module folder."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can return a page title, breadcrumb path, and template variables."," ","You can also require a client login with a simple true/false response."," ","Language strings from the modules language file (",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/addon-modules/multi-language","title":"Multi Language Support"},"children":["see here"]},") are also available."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Access Client area modules using an URL in the format ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["index.php?m=modulename"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"example-client-area-function","__idx":1},"children":["Example Client Area Function ",{"$$mdtype":"Tag","name":"a","attributes":{"id":"example-function"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here is a sample client area function demonstrating all the available return variables:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"function demo_clientarea($vars) {\n \n    $modulelink = $vars['modulelink'];\n    $version = $vars['version'];\n    $option1 = $vars['option1'];\n    $option2 = $vars['option2'];\n    $option3 = $vars['option3'];\n    $option4 = $vars['option4'];\n    $option5 = $vars['option5'];\n    $option6 = $vars['option6'];\n    $LANG = $vars['_lang'];\n \n    return array(\n        'pagetitle' => 'Addon Module',\n        'breadcrumb' => array('index.php?m=demo'=>'Demo Addon'),\n        'templatefile' => 'clienthome',\n        'requirelogin' => true, # accepts true/false\n        'forcessl' => false, # accepts true/false\n        'vars' => array(\n            'testvar' => 'demo',\n            'anothervar' => 'value',\n            'sample' => 'test',\n        ),\n    );\n \n}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The above assumes a template, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["clienthome.tpl"]},", existing within the module folder to use for the output."]}]},"headings":[{"value":"Client Area Output","id":"client-area-output","depth":1},{"value":"Example Client Area Function","id":"example-client-area-function","depth":2}],"frontmatter":{"title":"Client Area Output","seo":{"title":"Client Area Output"}},"lastModified":"2026-08-03T17:00:42.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/addon-modules/client-area-output","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}