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?
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');
来源:https://stackoverflow.com/questions/13275611/show-only-the-content-of-article