Add a Category Default Image to articles without Images

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Fri Jul 19, 2013 5:48 am
Reply with quote
Report this post
I love this template, however, when there is an article without an image it displays pretty bad. Is there a way to select a default for K2 items?

In other words, what I am trying to do is have the Category Image appear in articles (items) that do NOT have an image.

Any ideas or thoughts?

Someone in another thread suggested modifying the code, which I am not comfortable doing... Please help!
User avatar
Senior Boarder

GK User
Fri Jul 19, 2013 8:56 am
Reply with quote
Report this post
Joomla! of course don't have this kind of feature. You can of course modify default article view but remember to modify template overrided files - html/com_content/article/default.php where you can find layout for single article.
User avatar
Platinum Boarder

GK User
Fri Jul 19, 2013 12:57 pm
Reply with quote
Report this post
bkrztuk wrote:Joomla! of course don't have this kind of feature. You can of course modify default article view but remember to modify template overrided files - html/com_content/article/default.php where you can find layout for single article.


Can you walk me through how to do this?

What I would like to do is have a default image per category/Sub-category. This way when there is NOT an image in the Article everything will still display properly.
User avatar
Senior Boarder

GK User
Mon Jul 22, 2013 10:06 am
Reply with quote
Report this post
Sorry but this is far beyond our support and there is some part of code which you can copy and paste. First of all you need to check whether the images exist, they are keept in ->images field or article instance. Them you need to access to article category, probably the only way is use some Joomla! Helper class.
User avatar
Platinum Boarder


cron