簡體   English   中英

Joomla文章在同一頁面中打開

[英]Joomla Articles Opening In Same Page

我對Joomla和PHP還是很陌生。

我在網站http://smileisnc.co.uk/index.php/news上有一個頁面,當您單擊“閱讀更多”時,它將在同一頁面上打開該文章。 當我單擊閱讀更多時,我希望文章在新窗口中打開。

這是我目前在其中的代碼:

    <?php if ($params->get('show_readmore')) :?>
                    <p class="mod-articles-category-readmore">
                    <a class="mod-articles-category-title <?php echo $item->active; ?>" href="<?php echo $item->link; ?>">
                    <?php if ($item->params->get('access-view') == false) :
                        echo JText::_('MOD_ARTICLES_CATEGORY_REGISTER_TO_READ_MORE');
                    elseif ($readmore = $item->alternative_readmore) :
                        echo $readmore;
                        echo JHtml::_('string.truncate', $item->title, $params->get('readmore_limit'));
                            if ($params->get('show_readmore_title', 0) != 0) :
                                echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
                                endif;
                    elseif ($params->get('show_readmore_title', 0) == 0) :
                        echo JText::sprintf('MOD_ARTICLES_CATEGORY_READ_MORE_TITLE');
                    else :
                        echo JText::_('MOD_ARTICLES_CATEGORY_READ_MORE');
                        echo JHtml::_('string.truncate', ($item->title), $params->get('readmore_limit'));
                    endif; ?>
                    </a>
                    </p>
                <?php endif; ?>
            </li>
        <?php endforeach; ?>

有沒有人有什么建議?

也許將target="_blank"到您的readmore鏈接中,請參見下文:

    <?php if ($params->get('show_readmore')) :?>
                <p class="mod-articles-category-readmore">
                <a class="mod-articles-category-title <?php echo $item->active; ?>" href="<?php echo $item->link; ?> target="_blank">
                <?php if ($item->params->get('access-view') == false) :
                    echo JText::_('MOD_ARTICLES_CATEGORY_REGISTER_TO_READ_MORE');
                elseif ($readmore = $item->alternative_readmore) :
                    echo $readmore;
                    echo JHtml::_('string.truncate', $item->title, $params->get('readmore_limit'));
                        if ($params->get('show_readmore_title', 0) != 0) :
                            echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
                            endif;
                elseif ($params->get('show_readmore_title', 0) == 0) :
                    echo JText::sprintf('MOD_ARTICLES_CATEGORY_READ_MORE_TITLE');
                else :
                    echo JText::_('MOD_ARTICLES_CATEGORY_READ_MORE');
                    echo JHtml::_('string.truncate', ($item->title), $params->get('readmore_limit'));
                endif; ?>
                </a>
                </p>
            <?php endif; ?>
        </li>
    <?php endforeach; ?>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM