Keyword

Definir imagem padrão para itens do K2 sem imagem

  • Lucas Nascimento
  • Lucas Nascimento's Avatar Topic Author
  • Offline
  • New Member
More
5 years 5 months ago #170221 by Lucas Nascimento
Definir imagem padrão para itens do K2 sem imagem was created by Lucas Nascimento
Olá a todos!

Gostaria de saber se é possível definir uma imagem padrão para os itens do K2 que não tem uma imagem carregada. Já pesquisei bastante aqui e em outros fóruns, mas não achei nenhuma resposta conclusiva. Já tentei editar o php do K2, mas pelo jeito não o fiz corretamente... se alguem puder me dar uma luz, agradeço!

Joomla 3.8.12
K2 2.9.0

Please Log in or Create an account to join the conversation.

More
5 years 5 months ago #170224 by JoomlaWorks
Replied by JoomlaWorks on topic Definir imagem padrão para itens do K2 sem imagem
E.g. in item.php, add this at the very top of the file (before the closing ?>):
if(empty($this->item->image)) {
    $this->item->image = '/path/to/placeholder_image.jpg';
}

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum