Joomla myBlog模板

问题描述 投票:0回答:1

我想在myBlog组件中编辑我当前的模板,我相信它位于这里:

\components\com_myblog\templates\bluestyle 

我问的主要原因是因为我不知道要修复我所维护的网站中的位置偏差。

但是,如果您尝试浏览站点顶部的其他选项卡,它们完全没有问题,那么,除了默认的Joomla模板之外,myBlog组件也有自己的模板。

我相信问题出在我的Joomla文件的此路径中的某处:

C:\xampp\htdocs\lopez-link\components\com_myblog\templates\bluesky

显然,我选择的模板在此文件夹中名为“ bluesky”,它具有3个html文件(bloginfo.tmpl.htmlentry.tmpl.htmlindex.tmpl.html)和一个CSS文件(template_style)。我包括在index.tmpl.html代码下面。

index.tmpl.html

<?php
if ($entry and is_array($entry) and count($entry) != 0)
{
    foreach ($entry as $e)
    {
        $date = strtotime($e['created']);
        $month_day = strftime("%b ", $date) . strftime("%d", $date);
        $year = strftime("%Y", $date);
        $month_day = i8n_date($month_day);
    ?>
 <div class="entryContent">
<div class="entry">
    <table class="entryTitle">
        <tr>
            <td class="my-dateCell">
                <div class="dateContainer">     
                    <div class="date">
                        <div class="month"><span><?php echo $month_day; ?></span></div>
                        <div class="year"><span><?php echo $year; ?></span></div>
                    </div>
                </div>
            </td>
            <td class="my-titleCell">
                <div class="entry-title">
                    <h3><a href="<?php echo $e['permalink']; ?>"><?php echo $e['title']; ?></a></h3>
                    <p>_MB_POSTED_BY <a href="<?php echo $e['authorLink']; ?>"><?php echo $e['author']; ?></a> in <?php echo $e['categories']; ?></p>
                </div>
            </td>           
            <?php if(!empty($e['avatar'])){ ?>
            <td class="my-avatarCell">
                <div class="userAvatar">
                <?php echo $e['avatar']; ?>
                </div>
            </td>
            <?php } ?>
        </tr>
    </table>
    <?php
        if ($e['beforeContent'])
        { ?>
        <div class="onBeforePrepareContent">
            <?php echo $e['beforeContent'];?>
        </div>
        <?php
        }
        ?>
    <div class="entry-body"> 
        <?php echo $e['text']; ?>
        <div class="clear"></div> 
    </div>
    <?php if ($e['afterContent'])
        { ?>
        <div class="onAfterPrepareContent">
            <?php echo $e['afterContent'];?>
        </div>
        <?php
        }
        ?>
    <div class="entry-footer">
        <?php
            if ($e['comments']!="") // if comments enabled

                echo '<div class="entry-comment"><a href="'.$e['permalink'].'#comments">'.$e['comments'] .'</a>';
            else
                echo '<div>';
            if ($e['comments']!="" and $e['readmore']=="1")
                 echo ' | ';
        ?>
        <?php  // IF NEED READMORE
        if ($e['readmore']=="1")
        { ?>
        <a href="<?php echo $e['permalink']; ?><?php echo $showAnchor; ?>">_MB_READ_MORE...</a>
        <?php } ?>
        </div> 
    </div>
</div>
 <?php
}
   }
 ?>

我该如何解决?

php joomla joomla-template
1个回答
2
投票
编辑:希望这对您有帮助。查找代码

if ($e['readmore']=="1") { ?> <a href="<?php echo $e['permalink']; ?><?php echo $showAnchor; ?>">_MB_READ_MORE...</a> <?php }

并替换为

if ($e['readmore']=="1") { ?> <a href="<?php echo $e['permalink']; ?><?php echo $showAnchor; ?>">_MB_READ_MORE...</a> <?php } echo '</div>';

© www.soinside.com 2019 - 2024. All rights reserved.