WHMCS插件模块,带多页 [英] WHMCS Addon Module with Multiple Pages

查看:789
本文介绍了WHMCS插件模块,带多页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发我的第一个WHMCS插件模块,到目前为止一切都非常顺利。但是,我需要让多个内容页面,并根据维基文章是呼应其在输出函数来显示输出的唯一途径。如何创建个人页面时显示内容的唯一方法是通过一个单一的PHP函数?

I am currently working on developing my first WHMCS Addon Module, and so far everything has gone very well. However, I need to make multiple content pages, and the only way to display output according to the Wiki Article is to echo it in the output function. How can I create individual pages when the only way to display content is via a single PHP function?

我使用div的假设,并隐藏了有关申报单,虽然不完全是最好的方法。它说,你可以使用modulelink变量链接到该模块,但我不知道如何使用这个,或者如果可以用于多份内容页。

I am assuming using divs, and hiding the relevant divs, although not exactly the best method. It says you can use the "modulelink" variable to link back to the module, but I have no idea how to use this, or if it can be used for making multiple content pages.

http://docs.whmcs.com/Addon_Module_Developer_Docs

推荐答案

一些修修补补后,这是更简单的比我意识到,与modulelink变量只是所以你可以链接到该页面。要创建更多的页面,你可以基本上只是做沿...东西线

After some tinkering, it was much more simple than I realized, and the "modulelink" variable was just so you could link back to the page. To create additional pages, you can basically just do something along the lines of...

<a href="addonmodules.php?module=device_portal&catid=1">Datacenters</a>

然后在输出功能有...

Then in the output function have...

$category = $_GET['catid'];

if ($category == "1" || $category == "")
{
//page 1 content here
}
else if ($category == "2")
{
//page 2 content here
}

等。

这篇关于WHMCS插件模块,带多页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆