Article ID/URL in Category Blog Layout - Joomla! Forum - community, help and support
i creating social media sharing module display share links facebook, twitter , g+.
i have 1 blog category category blog layout, module embedded in top of article display between article details (published date, author, etc) , content.
everything working on individual article pages using following snippets:
for article title:
and url:
my problem social media buttons display on category blog layout page. have set display full articles in full width column.
i able pick url article , it's title category blog layout. have ideas?
i have 1 blog category category blog layout, module embedded in top of article display between article details (published date, author, etc) , content.
everything working on individual article pages using following snippets:
for article title:
code: select all
$option = jrequest::getcmd('option');
$view = jrequest::getcmd('view');
if ($option=="com_content" && $view=="article") {
$ids = explode(':',jrequest::getstring('id'));
$article_id = $ids[0];
$article =& jtable::getinstance("content");
$article->load($article_id);
$title = $article->get("title");
}
and url:
code: select all
$url = juri::getinstance();
$url = $url->tostring();
my problem social media buttons display on category blog layout page. have set display full articles in full width column.
i able pick url article , it's title category blog layout. have ideas?
a plugin more appropriate. lot of social media sharing extensions exist.
on blog page, id each article have fetched. not on url.
the "onafterdisplaytitle" event can used put them after title of article.
http://docs.joomla.org/plugin/events/content#onafterdisplaytitle
on blog page, id each article have fetched. not on url.
the "onafterdisplaytitle" event can used put them after title of article.
http://docs.joomla.org/plugin/events/content#onafterdisplaytitle
Comments
Post a Comment