Developer Center

Sub-Page Content / Output

To create the content, you should create a function with main name in the class, its return must strictly be array.

Links / Actions

Using $this->area_link variable, you can define returned URLs to your module.

$this->area_link variable will be in "http://..../addon/SampleAddon" format. For links, you can add as “?variable1=x&variable2=y” for links. For forms, use the POST form method to retrieve user input.

In the Output function, to get user input; $_GET or $_POST variables can be directly accessed.

Client or Administrator Data

You can use $this->user[] or $this->admin[] variable in the function, see "Parameters" document to learn the data you will obtain from variables.

Sample Function

public function main()
{
    $action = Filter::init("REQUEST/action","route");
    if(!$action) $action = 'index';

    $variables = [
        'link'              => $this->area_link,  /* https://***..com/addon/SampleAddon/client */
        'dir_link'          => $this->url,       /* https://***..com/coremio/modules/Addons/SampleAddon/ */
        'dir_path'          => $this->dir,      /* /-- DOCUMENT ROOT --/coremio/modules/Addons/SampleAddon/ */
        'dir_name'          => $this->_name,    /* SampleAddon, */
        'name'              => $this->lang["meta"]["name"], /* Sample Addon */
        'version'           => $this->config["meta"]["version"], /* 1.0 */
        'fields'            => $this->fields(),
    ];

    return [
        'use_with_theme'   => true,
        'header_background' => 'https://pixabay.com/get/54e8d4404e5aab14f6d1867dda6d49214b6ac3e456567641752d73d592/nature-2813487_1920.jpg',
        'page_title'        => 'Sample Addon Module',
        'breadcrumbs'       => [
            [
                'link'      => '',
                'title'     => 'Sample Addon',
            ],
        ],
        'content'           => $this->view($action.".php",$variables)
    ];
}
Client Area Content / Output Multi-Language Support

Do you have any questions?

Feel free to contact us
Contact Us
Copyright © 2024. All Rights Reserved.
Join Our Discord Channel
Top

New Year's Special Discount

"Startup Lifetime" and "Professional Lifetime" licenses are 30% off!

Coupon Code:
HAPPYYEARS30 Copied!
Discount Rate 30%
Expiration Date December 31, 2024