Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在我的网站中使用 ZenCart,实际上我想自定义我的网站的外观。我已经为索引页而不是内页这样做了,因为这些相同的页面正在用于内页。
例如,横幅图像在索引页面上,我不想在内页中看到它。检查页面是否是任何其他内页的索引页面的正确方法是什么。
简单的
检查下面的代码
if($_GET['main_page']=='index' and !isset($_GET['cPath'])) { // your code }
使用$current_page_base变量 - 它由 Zen Cart 设置和维护。我不确定 $_GET['main_page']Zen Cart 代码中是否曾被覆盖,但不依赖它似乎更安全。
$current_page_base
$_GET['main_page']