show only the content of article

一曲冷凌霜 提交于 2019-12-09 01:16:44

问题


how do I only show content in a single article?

I am using Joomla 2.5 and Ajax to call a single article, but when I render the article in a <div> tag, I render again the header, the footer and all the page , but I only want the content.

How do I configure the page or the article to show only the content?


回答1:


If you only want to get component you can append tmpl=component parameter with the url. Your article url will be like this-

index.php?option=com_content&view=article&id=1&tmpl=component

Or you can try like this-

$('#result').load('index.php?option=com_content&view=article&id=1&tmpl=component #container');

Loading Page Fragments



来源:https://stackoverflow.com/questions/13275611/show-only-the-content-of-article

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!