Drupal - Construindo template com ZEN Theme: mudanças entre as edições

De Pontão Nós Digitais
Ir para navegaçãoIr para pesquisar
Sem resumo de edição
Linha 9: Linha 9:
== Por que usar ZEN? ==
== Por que usar ZEN? ==


Why should you create your theme as a Zen sub-theme as opposed to just modifying an existing theme?
# Suporte: prover ou receber suporte para qualquer tema do Drupal pode ser uma tarefa custosa. A primeira razão para isso é que a pessoa que tenta prover suporte não tem o código exato ou nunca viu antes o código do tema que você está usando. Se você modificou um tema já existente, algumas vezes a única resposta para sua dúvida é "Bem, no tema original está funcionando sem problemas. =(". Se você modificou um tema de um jeito desconhecido, será extremamente difícil obter ajuda. Entretanto, se você seguir as linhas-guia de um sub-tema com ZEN (sem modificar, portanto, qualquer arquivo do núcleo do ZEN), qualquer necessidade de suporte será mais simples e rápida. Para isso você deverá modificar os arquivos STARTERKITS de maneiras apropriadas. O núcleo do ZEN é cuidadosamente testado por muitas pessoas, em diversos navegadores diferentes para que seja conhecida toda performance desse tema em diferentes cenários. Dessa forma, qualquer diferença ou problema entre um sub-tema e o núcleo do ZEN pode ser rapidamente isolada para sobrescrita de funções em seu template.php ou em seus arquivos .tpl.php.
 
# Sem Bugs:
    Support: Providing or receiving support for any theme you develop in Drupal’s normal support forums can be difficult. The primary reason for this difficulty is that the person trying to provide support does not have any of the code you are using in your theme and/or they have never before seen the code you are using. If you have modified an existing theme, sometimes the only answer you will get to your support question is “Well, it works fine in the original theme.” Because you have modified the theme’s code in an unknown way, it will be extremely difficult to get help.
 
    However, if you are following the Zen sub-theme guidelines for developing your theme (i.e. don’t modify any of Zen’s core files), any support issues become much simpler to deal with. You are modifying the STARTERKIT files in known ways. Zen core is carefully tested so many people know how it works and reacts in various browsers. And any differences you might be experiencing between your sub-theme and Zen core can be quickly isolated to override functions in your template.php or to override .tpl.php files.


     Bug fixes: Occasionally there will be bugs found in Zen core. If you have modified any of Zen’s core files, it will be difficult for you to incorporate any of those bug fixes into your modified version of Zen. If, on the other hand, you have only modified files in your Zen sub-theme, getting those bug fixes becomes much easier; just replace the old Zen core files with the new ones. If your sub-theme overrides the PHP or CSS where the bug existed, the fixes will be carefully documented online so that you can more easily update your sub-theme.
     Bug fixes: Occasionally there will be bugs found in Zen core. If you have modified any of Zen’s core files, it will be difficult for you to incorporate any of those bug fixes into your modified version of Zen. If, on the other hand, you have only modified files in your Zen sub-theme, getting those bug fixes becomes much easier; just replace the old Zen core files with the new ones. If your sub-theme overrides the PHP or CSS where the bug existed, the fixes will be carefully documented online so that you can more easily update your sub-theme.


# Novas funcionalidade: De tempos em tempos novas funcionalidades são incorporadas ao núcleo do tema ZEN.
     New features: Occasionally there will be new features that will be added to Zen core. Again, as long as you haven’t modified any Zen core files, you can easily add those features to your sub-theme with minimal or no extra coding.
     New features: Occasionally there will be new features that will be added to Zen core. Again, as long as you haven’t modified any Zen core files, you can easily add those features to your sub-theme with minimal or no extra coding.



Edição das 20h57min de 13 de novembro de 2013

ZEN Template

ZEN é um simples e poderoso tema para Drupal, feito com HTML5 e design responsivo. Se você está montando sua própria instalação standart drupal, você poderá facilitar o trabalho utilizando ZEN ao invés dos temas padrão Galard, Stark ou Bartik. Esse tema tem bastante documentação em foruns de ajuda, código amigável, comentários em php, html, css e SASS. Até o presente a maior parte dessa documentação é em inglês, mas já há algum material em português.

Por que você deveria usar ZEN? E por que você deveria criar seu próprio tema como um sub-tema ao invés de um tema padrão? Muitas razões.

Se você estiver rodando uma instalação Drupal 7.x e pensa em trabalhar com ZEN 5.x, então você irá precisar do SASS e do Compass Tools. Eles não estão instalados por padrão na maior parte das distribuições linux (e com certeza não no Rwindos). Mas você pode encontrar alguns tutoriais de ajuda na internet de como obtê-lo, como esse: https://drupal.org/node/1548946

Por que usar ZEN?

  1. Suporte: prover ou receber suporte para qualquer tema do Drupal pode ser uma tarefa custosa. A primeira razão para isso é que a pessoa que tenta prover suporte não tem o código exato ou nunca viu antes o código do tema que você está usando. Se você modificou um tema já existente, algumas vezes a única resposta para sua dúvida é "Bem, no tema original está funcionando sem problemas. =(". Se você modificou um tema de um jeito desconhecido, será extremamente difícil obter ajuda. Entretanto, se você seguir as linhas-guia de um sub-tema com ZEN (sem modificar, portanto, qualquer arquivo do núcleo do ZEN), qualquer necessidade de suporte será mais simples e rápida. Para isso você deverá modificar os arquivos STARTERKITS de maneiras apropriadas. O núcleo do ZEN é cuidadosamente testado por muitas pessoas, em diversos navegadores diferentes para que seja conhecida toda performance desse tema em diferentes cenários. Dessa forma, qualquer diferença ou problema entre um sub-tema e o núcleo do ZEN pode ser rapidamente isolada para sobrescrita de funções em seu template.php ou em seus arquivos .tpl.php.
  2. Sem Bugs:
   Bug fixes: Occasionally there will be bugs found in Zen core. If you have modified any of Zen’s core files, it will be difficult for you to incorporate any of those bug fixes into your modified version of Zen. If, on the other hand, you have only modified files in your Zen sub-theme, getting those bug fixes becomes much easier; just replace the old Zen core files with the new ones. If your sub-theme overrides the PHP or CSS where the bug existed, the fixes will be carefully documented online so that you can more easily update your sub-theme.
  1. Novas funcionalidade: De tempos em tempos novas funcionalidades são incorporadas ao núcleo do tema ZEN.
   New features: Occasionally there will be new features that will be added to Zen core. Again, as long as you haven’t modified any Zen core files, you can easily add those features to your sub-theme with minimal or no extra coding.


Referências: