簡體   English   中英

使更多鏈接在joomla的單獨頁面上打開

[英]Make read more link open on separate page in joomla

我正在使用joomla 2.5。 創建文章時,我會添加更多閱讀文章的鏈接。 我遇到的問題是,當頁面上只有一篇文章時,“閱讀更多”鏈接會用新文章覆蓋該內容。 我希望閱讀更多鏈接作為單獨的頁面打開。 我希望它是動態的,而不是手動更改。

我有什么想念的嗎? 任何幫助表示贊賞。 謝謝

我不確定您是否對它進行了整理,但我想我知道您的意思。

您可能需要創建一個新菜單並將其用作隱藏菜單

因此,要在單獨的頁面或自己的頁面中打開文章,請創建一個隱藏菜單。

1-轉到菜單2-單擊菜單項旁邊的菜單選項卡3-單擊新菜單4-給它提供標題示例隱藏菜單5-填寫菜單類型示例隱藏6-說明可選

在您創建的這個新菜單中,您想創建一個菜單項

取決於您文章的存儲位置,取決於您的菜單項

假設您的文章屬於新聞類別

制作一個新的菜單項,將其命名為您想要的

然后在菜單項類型中選擇Category Blog,然后在Required Settings中選擇您的類別...

保存菜單項...

那應該做你想要的...

因此,當您單擊主菜單時,在主菜單中有一篇屬於新聞類別的文章。 文章應單獨在同一窗口中打開...

請原諒發現任何拼寫錯誤...

我假設您是在談論target屬性,如果需要,這是您需要查看的地方

Value   Description
_blank  Opens the linked document in a new window or tab
_self   Opens the linked document in the same frame as it was clicked (this is default)
_parent Opens the linked document in the parent frame
_top    Opens the linked document in the full body of the window
framename   Opens the linked document in a named frame

例如, <a href="http://example.com" target="_self" >Open link in the same frame</a>

而對於您正在尋找的是

<a href="http://example.com" target="_blank" >Read More</a>

我經歷了Newsflash模塊選項和源代碼,不幸的是,該模塊將始終在同一窗口中打開鏈接。

您將需要覆蓋布局以修改此行為。

http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core

這是您需要“克隆”到模板文件夾中的文件,如上面的鏈接所述:

modules / mod_articles_news / tmpl / _item.php

最后,在新文件中,將第16行修改為:

<a href="<?php echo $item->link;?>" target="_blank">

然后是第34行

echo '<a class="readmore" href="'.$item->link.'" target="_blank">'.$item->linkText.'</a>';

暫無
暫無

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

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