如何使一篇特定文章始终位于首页顶部?
在我的 Joomla 网站上,我希望首页的第一篇文章始终是“关于我们公司”的文章。我希望随着新文章的添加,其他文章的位置会下移,但要保持“关于我们公司”的文章始终位于最前面。
我尝试将首页管理器上该文章的顺序设置为-1,但当我添加新文章时它仍然下移。
有什么想法吗?
On my Joomla website, I'd like to have a "about our company" article always be the first article on the front page. I want the other articles to shift down in position as new articles are added, but to keep the "about our company" one constantly on top.
I tried setting the order of that article on the front page manager to -1, but it still shifted down when I added a new article.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
您可以将该信息写入模块中,并将该模块发布到显示在组件之前的位置。
You could write that info in a module and publish that module in a position that shows up before the component.
您有按日期排序的首页吗?如果您这样做,则将“关于我们”文章的创建日期设置为 2099-01-01,并确保关闭该文章的显示日期
Do you have the front page sorted by date? If you do then make the about us article have a created date of 2099-01-01 and make sure you switch off show date for that article
除非您找到满足此特定需求的足够插件,否则恐怕您必须手动修改模板。
Unless you find an adequate plugin for this specific need, I'm afraid you have to manually modify the template.
根据设置,您可以将部分或类别信息用作“假”文章。启用在菜单项中显示部分/类别描述(默认情况下关闭),您将看到始终位于顶部的文本。
Depending on the setup, you can use the section or category info as a "fake" article. Enable showing the section/category description in the menu item (it's off by default) and you'll have a text that is always at the top.
我在同样的问题上苦苦挣扎,...并在 joomla 文档中找到了解决方案。
在首页管理器中,将您想要“始终位于顶部”的文章的订单号设置为 -1(减一)。这将确保它的订单号始终低于其他文章,即使其他人提交文章也是如此。
I was struggelng with the same issue,... and have found the solution in the joomla documentation.
In the frontpage manager set order number for the article that you want to be "always-on-top" to -1 (minus one). This will make sure it will always have a lower order number than the other articles, even when other people submit articles.
对于 Joomla 1.5,请转到 FrontPage Manager。您希望始终位于顶部的文章,请在“订单”列中输入 -1(如 William 上面所述)。现在,在该栏的名称旁边,有一张软盘的图片 - 您必须单击该图标才能保存订单。
现在,您的欢迎文章编号为 -1,并且将始终位于首页顶部。
For Joomla 1.5, go to your FrontPage Manager. The article you want to always have at the top, type is -1 in the ORDER column (as William said above). Now next to the name of this column, there is a picture of a floppy disk - you MUST click on this icon to SAVE the order.
Now your WELCOME article is numbered -1 and will always be at the top of your front page.
这个问题是 Google 的最高结果,但自从提出并回答以来,Joomla 已经升级了很多次。这是一个更新的选项:
在 Joomla 3.4 中,您可以通过转到显示文章的类别的设置,然后转到其博客布局,然后将文章顺序设置为精选文章顺序来执行此操作。这使得特色文章出现在普通文章之上。
This question is Google top result, yet Joomla has been upgraded many times since it was asked and answered. Here is a more recent option:
In Joomla 3.4, you can do this by going to the settings of the category that displays the articles, then to its Blog Layout, then set Article Order to Featured Articles Order. This makes featured articles appear above normal articles.
2020 年,人们可以将自定义字段(自 Joomla 3.7 起可用)添加到 Joomla 文章中,或者仅添加到某一类别的文章中,然后修改模板以查询此自定义字段并相应地处理文章。
In 2020, one could add Custom Fields (available since Joomla 3.7) to Joomla articles, or just to articles in a certain category, and then modify the template to query this Custom Field and handle articles accordingly.
在 joomla 1.5 中的订单号中,将订单号设置为负数不起作用,它会不断恢复为默认数字。
in the order number in joomla 1.5 setting the order number to a minus figure doesn't work, it keeps reverting back to the default number.