如何在 Zen Cart 中没有侧边栏的页面上获得额外的横幅广告?

发布于 2024-08-19 07:20:09 字数 679 浏览 0 评论 0原文

我正在尝试在页脚的左侧添加横幅广告,所以我有这样的内容:

[ 横幅 ] [ 页脚信息 ]

这是基本横幅模块中的代码:

<div class="content">
    <?php
    $content = '';
    // if no active banner in the specified banner group then the box will not show
    if ($banner = zen_banner_exists('dynamic', $banner_box_group)) {
        $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
            $content .= zen_display_banner('static', $banner);
    $content .= '</div>';
    }
    echo $content;
?>
</div>

在主页上运行良好(它像我期望的那样显示广告)。但是,它不会在其他一些页面上显示任何广告。我认为这与侧边栏有关,因为它在广告选择不显示的页面上被关闭。我缺少什么?

I am trying to ad a banner ad to the left side of the footer so I have something like this:

[ banner ] [ footer information ]

This is the code that was in the basic banner module:

<div class="content">
    <?php
    $content = '';
    // if no active banner in the specified banner group then the box will not show
    if ($banner = zen_banner_exists('dynamic', $banner_box_group)) {
        $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
            $content .= zen_display_banner('static', $banner);
    $content .= '</div>';
    }
    echo $content;
?>
</div>

Which works fine on the home page (it displays an ad like I expect it to). It does not however display any ads on some of the other pages. I expect that it is something to do with the sidebar as it is turned off on the pages that the ads choose not to display. What am I missing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

橘寄 2024-08-26 07:20:09

啊,事实证明它

$banner_box_group

需要是一串用冒号分隔的横幅组,所以类似于:

'BannersAll:Sidebox-Banners'

Ah, it turns out that

$banner_box_group

needs to be a string of banner groups separated by colons, so something like:

'BannersAll:Sidebox-Banners'
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文