在 Joomla 工作表之外创建自定义 HTML 模块,但不显示

发布于 2025-01-08 10:55:52 字数 1179 浏览 0 评论 0原文

我有几个 Joomla!我对这些网站充满信心。我的乔姆拉!网站有一个艺术家模板。 我最近制作了一张“伸出”图片,突出了床单的边缘,并显示了一个机器人“从床单后面伸出来”。它还具有一个 postion:fixed 属性,以便它随用户滚动。我在 .css 中使用了背景图片来达到我想要的效果。 我想使用自定义 HTML 模块对带有 FB、Twitter 等的“社交框”做同样的事情,但我发现这很困难!

我已将自定义模块添加到index.php,并在.css 样式表中获得正确的样式。它在 index.php?tp=1 模板预览中准确显示了我想要的位置,但是,它没有显示在实时模板上。 从那时起,我尝试了不同的位置,并将其移到纸张上,并且显示得很好,但是,我希望将其从纸张上移开以节省空间。 我开始认为,如果无法使用该表,则可以在外面使用自定义模块。希望有一些 Joomla!大师如此?

我的 index.php 的一部分如下(我之前已经制作了自定义模块,这就是我的做法,从 Joomla! 文档中找到):

<?php if ($view->containsModules('right')) : ?>
<div class="art-layout-cell art-sidebar2">
<?php echo $view->position('right', 'art-block'); ?>
<div class="social">
<div id="social"><jdoc:include type="modules" name="social" /></div>
</div>
<div class="cleared"></div>
</div>

<?php endif; ?>

这将模块置于“正确”位置。

样式表中的 .css 样式为:

#social {
    position: fixed;
    top: 125px;
    margin-left: 203px;
    border: solid #D5D5D5;
    background-color: #DFDFDF;
    z-index: 29000;
    width: 70px;
}

任何帮助将不胜感激。我已经在 J​​oomla! 上发帖了论坛和艺人论坛都没有回复!

亲切的问候, 马特

I have a couple of Joomla! sites which I feel confident with. My Joomla! site has an artisteer template.
I recently made a "poking out" picture, that protruded the edge of the sheet, and showed an android "poking out from behind the sheet". This also has a postion:fixed attribute so that it scrolls with the user. I used a background-picture in .css to get this how I wanted it.
I would want to do the same thing for a "social box" with FB, twitter etc, using the custom HTML module, but I'm finding it difficult!

I have added the custom module to the index.php, and got the styling correct in the .css style sheet. It shows exactly where I want it on the index.php?tp=1 template preview, however, it doesnt show on the live template.
Since then, I have played around with different positions, and moved it onto the sheet and it has shown up fine, however, I would want it off the sheet to save room.
I'm starting to think that a custom module out side if the sheet isn't possible. Hopefully there are some Joomla! gurus on SO?

part of my index.php is below (i've made custom modules previous and this is how I've done it, found from Joomla! documents):

<?php if ($view->containsModules('right')) : ?>
<div class="art-layout-cell art-sidebar2">
<?php echo $view->position('right', 'art-block'); ?>
<div class="social">
<div id="social"><jdoc:include type="modules" name="social" /></div>
</div>
<div class="cleared"></div>
</div>

<?php endif; ?>

This places the module in the "right" position.

and the .css styling in the style sheet is:

#social {
    position: fixed;
    top: 125px;
    margin-left: 203px;
    border: solid #D5D5D5;
    background-color: #DFDFDF;
    z-index: 29000;
    width: 70px;
}

Any help would be appreciated. I have posted in the Joomla! forums and the artisteer forums, but I have had no response!

Kind Regards,
Matt

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

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

发布评论

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

评论(1

你的呼吸 2025-01-15 10:55:52

我将我的index.php更改为

<div class="art-logo">
</div>
<div id="header_menu"><jdoc:include type="modules" name="header_menu" /></div>
<div id="social"><jdoc:include type="modules" name="social" /></div>
<?php if ($view->containsModules('user3', 'extra1', 'extra2')) : ?>
<div class="art-bar art-nav">
<div class="art-nav-outer">

现在

<div id="social"><jdoc:include type="modules" name="social" /></div>

已经移动,并且现在是标题(我认为)。

然后我将 css 中的 div 编辑为:

#social {
    position: fixed;
    top: 180px;
    margin: -80px;
    border: solid #D5D5D5;
    background-color: #DFDFDF;
    z-index: 29000;
    width: 70px;
}

现在一切都显示得很好!

I changed my index.php to

<div class="art-logo">
</div>
<div id="header_menu"><jdoc:include type="modules" name="header_menu" /></div>
<div id="social"><jdoc:include type="modules" name="social" /></div>
<?php if ($view->containsModules('user3', 'extra1', 'extra2')) : ?>
<div class="art-bar art-nav">
<div class="art-nav-outer">

so the

<div id="social"><jdoc:include type="modules" name="social" /></div>

has now moved, and is now the header (i think).

I then edited the div in the css to:

#social {
    position: fixed;
    top: 180px;
    margin: -80px;
    border: solid #D5D5D5;
    background-color: #DFDFDF;
    z-index: 29000;
    width: 70px;
}

and all is displaying great now!!

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