Full Transcript

Guía de usuario de Drupal 8 Guía de usuario de Drupal 8 Resumen Esta guía fue escrita principalmente para personas con un conocimiento mínimo del sistema de gestión de contenido de Drupal. Los temas los ayudarán a ser expertos en la instalación, administración, construcción de sitios y/o mantenimien...

Guía de usuario de Drupal 8 Guía de usuario de Drupal 8 Resumen Esta guía fue escrita principalmente para personas con un conocimiento mínimo del sistema de gestión de contenido de Drupal. Los temas los ayudarán a ser expertos en la instalación, administración, construcción de sitios y/o mantenimiento del contenido de un sitio web basado en Drupal. La guía también está dirigida a personas que ya tienen alguna experiencia con una versión actual o pasada de Drupal, y desean ampliar el rango de sus habilidades y conocimientos o actualizarlos a la versión actual. Tabla de contenidos i. Prefacio..................................................................................................................................... vi i.1. Copyright....................................................................................................................... vi i.2. Audiencia y objetivo..................................................................................................... vi i.3. Organización................................................................................................................. vii i.4. Reportando problemas.............................................................................................. viii i.5. Convenciones en la guía.............................................................................................. ix i.6. Escenario de guía........................................................................................................ xii 1. Entendiendo Drupal................................................................................................................ 1 1.1. Concepto: Drupal como Sistema de Gestión de Contenidos................................... 1 1.2. Concept: Modules......................................................................................................... 3 1.3. Concept: Themes.......................................................................................................... 4 1.4. Concept: Distributions................................................................................................. 5 1.5. Concept: Types of Data............................................................................................... 6 1.6. Concept: The Drupal Project....................................................................................... 7 1.7. Concept: Drupal Licensing.......................................................................................... 8 2. Planificación de un sitio web............................................................................................... 10 2.1. Concept: Regions in a Theme................................................................................... 10 2.2. Planning Your Site Layout......................................................................................... 11 2.3. Concept: Content Entities and Fields....................................................................... 13 2.4. Concept: Modular Content........................................................................................ 15 2.5. Planning your Content Structure............................................................................. 16 2.6. Concept: Editorial Workflow...................................................................................... 19 2.7. Concept: User Interface, Configuration, and Content translation........................ 20 3. Instalación.............................................................................................................................. 22 3.1. Concept: Server Requirements................................................................................. 22 3.2. Concept: Additional Tools.......................................................................................... 23 3.3. Concept: Methods for Downloading and Installing the Core Software................ 26 3.4. Preparing to Install.................................................................................................... 28 3.5. Using Composer to Download and Update Files.................................................... 29 3.6. Downloading the Core Software Manually.............................................................. 32 3.7. Running the Interactive Installer.............................................................................. 34 4. Configuración básica del sitio.............................................................................................. 40 4.1. Concept: Administrative Overview........................................................................... 40 4.2. Editando la información básica del sitio web......................................................... 43 4.3. Installing a Module.................................................................................................... 45 4.4. Uninstalling Unused Modules................................................................................... 47 4.5. Configuring User Account Settings.......................................................................... 49 4.6. Configuring the Theme............................................................................................. 52 5. Gestión básica de páginas................................................................................................... 56 5.1. Concept: Paths, Aliases, and URLs........................................................................... 56 5.2. Creating a Content Item............................................................................................ 57 5.3. Editing a Content Item.............................................................................................. 59 5.4. Editing with the In-Place Editor................................................................................ 61 5.5. Designating a Front Page for your Site................................................................... 63 5.6. Concept: Menu........................................................................................................... 64 5.7. Adding a Page to the Navigation............................................................................. 66 iii Guía de usuario de Drupal 8 5.8. Changing the Order of Navigation........................................................................... 68 6. Configuración de la estructura de contenido.................................................................... 71 6.1. Adding a Content Type.............................................................................................. 71 6.2. Deleting a Content Type............................................................................................ 76 6.3. Adding Basic Fields to a Content Type.................................................................... 77 6.4. Concept: Reference Fields......................................................................................... 82 6.5. Concept: Taxonomy.................................................................................................... 83 6.6. Setting Up a Taxonomy............................................................................................. 84 6.7. Adición de un campo de referencia......................................................................... 90 6.8. Concept: Forms and Widgets.................................................................................... 93 6.9. Modificación de formularios de entrada de contenido.......................................... 94 6.10. Concept: View Modes and Formatters................................................................... 96 6.11. Changing Content Display...................................................................................... 97 6.12. Concept: Image Styles........................................................................................... 101 6.13. Setting Up an Image Style.................................................................................... 102 6.14. Concept: Responsive Image Styles....................................................................... 105 6.15. Concept: Text Formats and Editors...................................................................... 106 6.16. Configuring Text Formats and Editors................................................................. 107 7. Gestión de cuentas de usuario.......................................................................................... 110 7.1. Concept: Users, Roles, and Permissions................................................................ 110 7.2. Concept: The User 1 Account................................................................................. 111 7.3. Creating a Role......................................................................................................... 112 7.4. Creating a User Account......................................................................................... 114 7.5. Assigning Permissions to a Role............................................................................ 117 7.6. Changing a User’s Roles.......................................................................................... 119 7.7. Assigning Authors to Content................................................................................ 121 8. Bloques................................................................................................................................. 125 8.1. Concept: Blocks........................................................................................................ 125 8.2. Creating A Custom Block........................................................................................ 125 8.3. Placing a Block in a Region..................................................................................... 128 9. Creación de listados con Vistas......................................................................................... 131 9.1. Concept: Uses of Views........................................................................................... 131 9.2. Concept: The Parts of a View.................................................................................. 132 9.3. Creating a Content List View.................................................................................. 134 9.4. Duplicating a View................................................................................................... 138 9.5. Adding a Block Display to a View........................................................................... 142 10. Haciendo su sitio multilingüe.......................................................................................... 147 10.1. Adding a Language................................................................................................ 147 10.2. Configuring Content Translation.......................................................................... 149 10.3. Translating Content............................................................................................... 152 10.4. Translating Configuration..................................................................................... 153 11. Extendiendo y personalizando su sitio web................................................................... 157 11.1. Finding Modules..................................................................................................... 157 11.2. Enabling and Disabling Maintenance Mode....................................................... 161 11.3. Downloading and Installing a Module from Drupal.org..................................... 164 11.4. Finding Themes...................................................................................................... 166 11.5. Downloading and Installing a Theme from Drupal.org...................................... 170 11.6. Manually Downloading Module or Theme Files................................................. 174 11.7. Concept: Development Sites................................................................................. 177 iv Guía de usuario de Drupal 8 11.8. Making a Development Site.................................................................................. 11.9. Deploying New Site Features................................................................................ 11.10. Synchronizing Configuration Versions............................................................... 11.11. Managing File and Configuration Revisions with Git....................................... 12. Preveniendo y arreglando problemas............................................................................ 12.1. Concept: Cache....................................................................................................... 12.2. Clearing the Cache................................................................................................. 12.3. Concept: Data Backups......................................................................................... 12.4. Concept: Log........................................................................................................... 12.5. Concept: Status Report.......................................................................................... 13. Seguridad y mantenimiento............................................................................................ 13.1. Concept: Cron......................................................................................................... 13.2. Configuring Cron Maintenance Tasks.................................................................. 13.3. Concept: Security and Regular Updates.............................................................. 13.4. Keeping Track of Updates..................................................................................... 13.5. Updating the Core Software................................................................................. 13.6. Updating a Module................................................................................................ 13.7. Updating a Theme................................................................................................. 14. Conclusiones...................................................................................................................... 14.1. Connecting with the Community......................................................................... 14.2. Getting Support...................................................................................................... 14.3. Learning More........................................................................................................ Glosario..................................................................................................................................... Índice......................................................................................................................................... A. Apéndice............................................................................................................................... A.1. Guide-Wide Attributions.......................................................................................... v 178 180 183 184 188 188 189 191 192 193 195 195 195 198 199 200 202 205 208 208 210 211 213 219 229 229 Prefacio i.1. Copyright Esta guía ha sido escrita por contribuidores del proyecto de software libre Drupal. La guía tiene copyright 2015-2017 para los contribuidores individuales, y puede ser usado de manera acorde con la licencia https://creativecommons.org/licenses/by-sa/2.0/ deed.es[ Licencia Creative Commons, Atribución-CompartirIgual 2.0 Genérica (CC BY-SA 2.0). Cada página de este documento ( incluyendo esta ) tiene una atribucion de contribuciones al final, listando la gente que ha colaborado escribiendo y editando esa página. Vea también Sección A.1, “Guide-Wide Attributions” para información sobre la edición, traducción, y gestión de la guía a nivel global. La licencia CC BY-SA 2.0 ( muy similar a la GPL ), permite que cualquiera copie, modifique, y redistribuya modificaciones de la totalidad o una parte de este trabajo, siempre y cuando se cumpla con las siguientes condiciones: Se provee suficiente crédito ( vea la licencia para más información ). Se provee un enlace a la licencia. Se indica si se han realizado cambios. Se distribuye cualquier trabajo derivado bajo la misma licencia que este original. Atribuciones Esta página ha sido adaptada y editada por Jennifer Hodgdon, y Jojy Alphonso para Red Crackle, en base a "Documentation copyright and licensing", copyright 2000-2021 para los contribuidores individuales de Documentación de la comunidad Drupal. noticia de copyright: Copyright 2015-2017 por los autores individuales; vea Sección i.1, “Copyright” para más detalles. Licenciado bajo CC BY-SA 2.0. i.2. Audiencia y objetivo Esta guía fue escrita principalmente para personas con un conocimiento mínimo del sistema de gestión de contenido de Drupal. Los temas los ayudarán a ser expertos en la instalación, administración, construcción de sitios y/o mantenimiento del contenido de un sitio web basado en Drupal. La guía también está dirigida a personas que ya tienen alguna experiencia con una versión actual o pasada de Drupal, y desean ampliar el rango de sus habilidades y conocimientos o actualizarlos a la versión actual. Esta guía asume que ya ha dedicido que quiere aprender y usar Drupal. Si necesita leer más antes de decidirse, vea Sección 1.1, “Concepto: Drupal como Sistema de Gestión de Contenidos”. vi Prefacio Dependiendo de qué aspectos de Drupal le gustaría aprender, va a necesitar algunos conocimientos preeliminares para entender esta guía: habilidades de uso de internet básicas son asumidas, y la guía se concentra en cómo usar el software en si mismo. Por ejemplo, las secciones sobre instalar Drupal en un servidor web asumen que puede obtener un alojamiento web y aprender por si mismo cómo transferir archivos a su servidor. De manera similar, las secciones sobre gestión de contenido asumen que puede iniciar sesión en una página web y rellenar un formulario. Después de leer esta guía, usted debería ser capaz de: Planificar las arquitecturas de contenido de una página basada en Drupal. Construir el sitio web que ha planificado Gestionar y administrar su sitio web Entender la documentación y las entradas de webs sobre los temas no cubiertos aqui, para expandir sus habilidades y conocimientos. Conectar con la comunidad de Drupal a nivel mundial Atribuciones Escrito por Jennifer Hodgdon. Traducido por Guiu Rocafort Ferrer. i.3. Organización Esta guía del usuario contiene una serie de temas, cada uno de los cuales cubre una tarea (cómo hacer algo) o un concepto (conocimientos básicos, terminología y similares). Los temas conceptuales tienen nombres que comienzan con Concepto: , mientras que los temas de tareas tienen nombres que contienen verbos, como Edición de información básica del sitio. Los temas se agrupan en capítulos en un orden lógico, con conceptos y tareas intercalados para que los conceptos se presenten antes que las tareas relacionadas, y las tareas se desarrollen entre sí. Para aprovechar esto, le recomendamos leer la guía completa en el orden presentado, posiblemente omitiendo temas que no son de interés o que presenten información que ya conoce. Recuerde probar las tareas en su propio sitio mientras lee la guía; La mayoría de las personas aprenden mejor haciendo en lugar de leer. Si lo prefiere, también puede usar el índice o la tabla de contenido para saltar directamente a un tema sobre el que le gustaría aprender, en lugar de leer la guía completa. Para facilitar este enfoque, cada tema enumera el conocimiento previo necesario para el tema, si lo hay (con enlaces a los temas que presentan ese conocimiento ); los temas de la tarea también enumeran los requisitos previos de su sitio web (cosas que necesitaría haber configurado o creado en su sitio para realizar la tarea). Además, la mayoría de los temas tienen secciones al final donde puede encontrar información relacionada y/o tareas para una mayor comprensión, y así poder profundizar en su aprendizaje. También puede consultar la sección Glosario a medida que lee: ofrece definiciones breves de la mayor parte de la terminología utilizada en la guía, con enlaces a temas con explicaciones más detalladas. vii Prefacio Atribuciones Escrito por Jennifer Hodgdon. Traducido por Guiu Rocafort Ferrer. i.4. Reportando problemas Objetivo Reportar un problema en esta guía, tales como: Información incorrecta o que no sigue las buenas prácticas Pasos que no funcionan Capturas de pantalla o texto que no encaja exactamente con lo que ve en la pantalla Pasos que no funcionan Redacción poco clara Lugares donde una tabla o una captura de pantalla no aclara el texto Terminología poco clara Conocimientos previos o requisitos del sitio web no especificados Errores tipográficos, gramáticos, de formato, o erratas Enlaces rotos Advertencia Los pasos detallados a continuación explican el procedimiento de reportar un error en la página de incidencias del proyecto. Esta página solamente está disponible en inglés, por lo que se indicarán los lugares en los que hay que hacer click o rellenar con el texto que aparece en Inglés. Pasos 1. Tome nota del tema o temas que contienen el problema que ha encontrado. 2. Inicie sesión en Drupal.org ( va a necesitar crear una cuenta si no está registrado ). 3. Visite la Página de incidencias en Drupal.org 4. Verifique que el problema que ha encontrado no ha sido informado ya en otro reporte. Si solo hay unos pocos reportes abiertos, escanee la columna de Title (Título ) para ver si alguna de las descripciones encaja con el problema que encontró. Quizás deba leer algunos de los reportes para asegurarse, lo cual puede hacer haciendo click en la columna de Title (Título). Si la lista de reportes abiertos es larga, puede introducir una palabra clave relacionada con el problema que encontró o el título del tema donde el problema ocurre en la viii Prefacio casilla Search for ( Buscar por ), y hacer click en Search ( Buscar ) para reducir la lista de reportes. Entonces, puede leer los títulos o leer los reportes para ver si alguno encaja con su problema. 5. Si determina que su problema no ha sido reportado todavía, haga click en Create a new issue ( Crear un nuevo reporte ), y rellene el formulario como sigue: Nombre del campo Explicación Valor de ejemplo Title ( Título) Resumen corto del problema que encontró Las instrucciones en "Crear un tipo de contenido" no funcionan Category ( Categoría ) Tipo de problema reportado Bug report Version ( Versión ) Versión de la guiía donde encontró el problema 8.x-0.x-dev Issue summary ( Resumen del incidente ) Detalles de los problemas que encontró En el apartado de "Añadir un tipo de contenido, en el paso 3, cuando hago click en Save, me aparece el siguiente mensaje de error: … 6. Relea el Title ( Título ) y el Issue summary ( Resumen de la incidencia ) que introdujo, y verifique que la siguiente información se encuentra incluida en su informe: Una descripción completa del problema El nombre del tema o temas donde encontró el problema El idioma en el que estuvo leyendo la guía Si leyó la guía en una página web, un enlace a la página o páginas donde se encuentra el problema 7. Haga click en Save ( Guardar ) ara crear la incidencia. 8. Revise la incidencia en unos dias. Si uno de los mantenedores del proyecto ha pedido alguna clarificación, responda añadiendo un comentario en la misma. Atribuciones Escrito por Jennifer Hodgdon. Traducido por Guiu Rocafort Ferrer. i.5. Convenciones en la guía Suposiciones y requisitos previos Esta guía hace las siguientes suposiciones y asume los siguientes requisitos previos: ix Prefacio Esta guía está organizada en temas; vea Sección i.3, “Organización” para más detalles. Muchos temas incluyen una sección de Conocimientos previos, que lista otros temas que se requieren conocer para comprender el tema que está leyendo. También se asumen algunos conocimientos básicos: vea Sección i.2, “Audiencia y objetivo” para más detalles. Muchos temas del tipo tarea listan Requisitos del sitio, que son tareas que debe realizar en su sitio web antes de poder empezar la tarea en el tema que está leyendo. Los requisitos del sitio específicos se relacionan con el escenario de ejemplo usado a través de la guía de construir un sitio web de un mercado de granjeros ( vea Sección i.6, “Escenario de guía” para más detalles). Puede adaptar las tareas a su propio escenario, pero también tendrá que recordar los cambios que hizo cuando decida si el sitio web satisface los requisitos de cada tarea. Para todos las tareas después de Sección 3.7, “Running the Interactive Installer”, hay también un requisito implícito: debe tener instalada la última versión estable del sistema de gestión de contenidos en su sitio, y haber iniciado sesión con un usuario que tenga suficientes permisos para realizar la tarea ( tal como la cuenta de usuario creada cuando instaló el sitio web, que automáticamente tiene todos los permisos). Si ha leido todos los temas en orden, y ejecutado todos los pasos en la tarea a medida que avanza ( manteniendo la sesión iniciada ), debera tener los conocimientos básicos y los requisitos del sitio cubiertos para cada tema a medida que lo va leyendo. Esta guía muestra como realizar tareas usando la interfaz de usuario administrativa, y, siempre que sea posible, también usando la última versión de la herramienta de línea de comando Drush ( vea Sección 3.2, “Concept: Additional Tools” ). Puede usar diferentes herramientas de consola, tal como Drupal Console ( si busca los comandos equivalentes ), o de usar la interfaz de administración por ahora. Convenciones de texto Las siguientes convenciones se han usado en el texto de esta guía: La URL ejemplo.com es la URL base de su sitio web. Vea la sección de Navegación abajo para más detalles sobre cómo se indican las URLs internas de su sitio. El texto que debería ver en la interfaz de usuario de su sitio web se muestra en cursiva, tal como: Haga click en Guardar configuración. Esto solo aplica a texto en la interfaz de usuario que viene del programa, no al texto que ha sido introducido en un tema anterior. Por ejemplo, en un tema sobre edición, podría ver este paso: Haga click en Editar en la fila de la página Sobre nosotros ( Editar debería estar en cursiva, pero Sobre nosotros no lo estará, porque la página Sobre nosotros fue creada en un tema anterior. URLs, nombres de archivo, y terminología nueva también se muestran en cursiva. El texto que debería introducir en una línea de comandos se muestra en tipología monospace, como por ejemplo: drush cr En esta guía, la palabra directorio siempre se usa para referirse a directorios de archivos ( algunas personas prefieren llamarlas carpetas ). x Prefacio Navegación Para hacer la mayoría de tareas en esta guía, necesitará visitar una o más páginas de la interfaz administrativa de su sitio. Podría ver alguna cosa como esta en las instrucciones ( esto tomará más sentido cuando haya instalado el software ). En el menú administrativo Administrar, navegue a Estructura > Taxonomía (admin/structure/ taxonomy) Las instrucciones de navegación como estas asumen que tiene el módulo Toolbar instalado, y este ejemplo significa, que en la barra superior en su sitio web, tendría que hacer click en Administrar para exponer las opciones del menú. Entonces, haga click en Estructura, luego en Taxonomía, y finalmente, estaría en la pagina con la URL http://example.com/admin/structure/ taxonomy ( si la URL base de su sitio web es http://example.com ). Aqui vemos otro ejemplo: En el menú administrativo Administrar, navegue a Configuración > Sistema > Configuraciones básicas del sitio ) (admin/config/system/site-information) En este ejemplo, después de hacer click en Administrar y Configuración, necesitaría encontrar la sección Sistema en la página, y dentro de ella, hacer click en Configuraciones básicas del sitio. Una vez realizados estos pasos, debería terminar en http://example.com/admin/config/ system/site-information_. Una nota más: si está usando el tema administrativo estándar del núcleo Seven, muchos botones de "Añadir" son mostrados con signos de + en ellos. Por ejemplo, en admin/ content, el botón de Agregar contenido aparece como + Agregar contenido. Sin embargo, esto depende del tema y no es realmente parte del texto en el botón (por ejemplo, no necesariamente sería leído por un lector de pantalla), por lo que en esta guía, la convención es no mencionar el signo + en el botones. Rellenando formularios Muchos de los temas de tareas en esta guía incluyen pasos donde completará un formulario web. En la mayoría de los casos, se incluirá una imagen de captura de pantalla del formulario, xi Prefacio junto con una tabla de los valores que deberá ingresar en cada campo del formulario. Por ejemplo, puede ver una tabla que comienza así, explicando el formulario de información del sitio que vería si navegara a Configuration> System> Site information (admin / config / system / site-information): Nombre del campo Explicación Valor de ejemplo Detalles del sitio > Nombre del sitio Nombre de su sitio web Mercado de granjeros CualquierPueblo Para usar esta tabla, busque el campo etiquetado como Nombre del sitio en la sección que se encuentra bajo Detalles del sitio en el formulario, y introduzca el nombre de su sitio web en ese campo. Se sugiere un ejemplo de valor "Mercado de granjeros CualquierPueblo" en la tabla, que está relacionado con el escenario de construir un sitio web para un mercado de granjeros y encontrará durante toda esta guía ( vea Sección i.6, “Escenario de guía” para más detalles ). En algunos formularios, usted tendrá que hacer click en el título de la sección ( como Detalles del sitio en este ejemplo ) para expandir la sección y encontrar el campo que contiene. Atribuciones Escrito/editado por Jennifer Hodgdon. Traducido por Guiu Rocafort Ferrer. i.6. Escenario de guía Cuando lee esta guía, es útil tener un proyecto de sitio web concreto en mente. El siguiente escenario de sitio web proporciona un contexto y hace de hilo conductor de los ejemplos en esta guía: Está haciendo un sitio web para un mercado de granjeros. Este sitio necesita mostrar información sobre la ubicación y horarios del mercado, y una página con información sobre la historia del mercado. También necesita una lista de proveedores. Los proveedores deben ser capaces de editar sus listados ( incluyendo un logo o fotografía), y las entradas de tipo receta. Los visitantes del sitio web pueden navegar por las recetas, o encontrar recetas usando ingredientes que han obtenido en el mercado. Algunos visitantes de su sitio hablan otro idioma, asi que las páginas principales y las páginas de los proveedores necesitan ser traducidas. A medida que avanza en la guía y prueba las tareas que se presentan, puede que elija seguir el escenario exactamente; también puede modificar las tareas para que se adapten mejor a sus propositos. Si sigue el escenario exactamente, va a necesitar algunas imágenes, que están ubicadas en el directorio assets del archivo.zip o.tgz disponible para descargar en la Portada de la Guía de usuario. Atribuciones xii Prefacio Escrito/editado por Jennifer Hodgdon. Traducido por Guiu Rocafort Ferrer. xiii Capítulo 1. Entendiendo Drupal 1.1. Concepto: Drupal como Sistema de Gestión de Contenidos ++++++ ¿Qué es un sistema de gestión de contenidos? Un sistema de gestión de contenidos (CMS por sus siglas en inglés) es una herramienta de software que permite a los usuarios añadir, publicar, editar o eliminar contenido desde un sitio web, utilizando un navegador web en un smartphone, tablet u ordenador personal. Habitualmente un software CMS se escribe en un lenguaje de programación que se ejecuta en un ordenador, donde se instalan un servidor web y una base de datos. El contenido y las opciones de configuración del sitio web normalmente se guardan en la base de datos, y por cada petición de página que recibe el servidor web, el sistema combina la información de la base de datos y los recursos (archivos JavaScript, CSS, imágenes, etc. que son parte del CMS o que han sido añadidos) para construir la página solicitada del sitio web. La combinación del sistema operativo donde se ejecuta el CMS, el lenguaje de programación en el que está escrito, la base de datos en la que se guarda su información, y el servidor web que ejecuta el software para obtener la información y devolverla al navegador del usuario que visita el sitio web es conocido como entorno o infraestructura en el que el CMS se ejecuta. La combinación del sistema operativo Linux, servidor web Apache, base de datos MySQL, y lenguaje de programación PHP es comunmente conocida como entorno LAMP. ¿Qué es Drupal? Drupal es un CMS flexible basado en el entorno LAMP, con un diseño modular que permite incorporar o quitar funcionalidad instalando o desinstalándo módulos, y permite que la apariencia o diseño del sitio web se pueda cambiar instalando o desistalando temas. La descarga básica de Drupal, conocida como el núcleo de Drupal, contiene los archivos PHP necesarios para ejecutar la funcionalidad básica del CMS, varias opciones de módulos y temas, y múltiples recursos JavaScript, CSS e imágenes. Se pueden descargar muchos más módulos y temas en el sitio web Drupal.org. Drupal también se puede ejecutar en otros entornos tecnológicos: El sistema operativo puede ser Windows o Mac Os en lugar de Linux. El servidor web puede ser Nginx o IIS en lugar de Apache. La base de datos puede ser PostgreSQL o SQLLite en lugar de MySQL, o sustituirla por otro sistema compatible con MySQL, como MariaDB o Percona. 1 Entendiendo Drupal Se puede hacer funcionar en otros sistemas operativos, servidores web, y sistemas de gestión de bases de datos, sin embargo hay que tener en cuenta que el lenguaje de programación en el que está escrito Drupal es PHP, y eso no se puede cambiar. ¿Cuáles son las razones para usar Drupal? Para construir una web, tenemos la opción de utilizar uno de los muchos CMS y servicios alojados existentes, desarrollar un CMS propio, o bien construir la web sin utilizar ningún CMS. Estas son algunas de las razones por las que elegir usar Drupal: Construir un sitio web pequeño y simple con páginas estáticas HTML no es difícil, y se puede tener preparado y funcionando muy rápidamente. Montar un sitio web en un CMS generalmente require más tiempo inicialmente, pero aporta el beneficio de la edición online (más sencilla para editores de contenido menos experimentados), uniformidad (más difícil de mantener utilizando HTML estático para sitios web grandes), y la posibilidad de incluir funcionalidad más compleja que puedan requerir una base de datos. Algunos CMS son muy específicos, por ejemplo, existen distribuciones y servicios alojados que se pueden usar para construir un blog o un sitio web para gestionar los miembros de un club. Drupal en cambio, es un CMS de propósito general. Para construir un sitio web con un propósito particular se podría elegir un CMS diseñado para ese propósito; sin embargo, si el proyecto difiere aunque sea ligeramente del propósito establecido por ese CMS, probablemente será mejor utilizar un CMS de propósito general en lugar de tratar de adaptarse o adapatar un CMS especifíco. Construir un software propio tipo CMS puede resultar atractivo. Sin embargo, habitualmente es mejor utilizar un CMS de propósito general como Drupal como punto de partida, ya que la funcionalidad básica (como cuentas de usuario o gestión de contenidos) lleva miles de horas de desarrollo, incluyendo muchos años de testeo de usuarios, corrección de errores y securización. Algunos productos CMS requiren pagar licencias muy costosas. Algunos son gratuitos o cuentan con una versión gratuita, pero tienen licencias restrictivas que no permiten hacer modificaciones o extender su funcionalidad. Puede ser preferible utilizar un CMS como Drupal que tiene menos licencias de software restrictivas, y que está desarrollado por una comunidad mundial. Ver Sección 1.6, “Concept: The Drupal Project” para más información sobre este tema. Temas relacionados Sección 1.2, “Concept: Modules” Sección 1.3, “Concept: Themes” Sección 1.4, “Concept: Distributions” Sección 1.6, “Concept: The Drupal Project” Recursos adicionales The Drupal overview 2 Entendiendo Drupal Drupal.org page "FAQ" (Frequently Asked Questions) Drupal.org page "Case Studies" Wikipedia page "Content management systems" Wikipedia page "Modular design" Atribuciones Escrito y editado por Kristof van Tomme en Pronovix, Jennifer Hodgdon, y Michael Lenahan en erdfisch. Traducido por Juan Olalla. Revisado por Alvaro Hurtado y Guiu Rocafort Ferrer 1.2. Concept: Modules Prerequisite knowledge Sección 1.1, “Concepto: Drupal como Sistema de Gestión de Contenidos” What is a module? A module is a set of PHP, JavaScript, and/or CSS files that extends site features and adds functionality. You can turn the features and functionality on by installing the module, and you can turn it off by uninstalling the module; before uninstalling, you may need to remove data and configuration related to the feature or functionality. Each module that is installed adds to the time needed to generate pages on your site, so it is a good idea to uninstall modules that are not needed. The core download provides modules for functionality such as: Managing user accounts (the core User module) Managing basic content (the core Node module) and fields (the core Field and Field UI modules; there are also core modules providing field types) Managing navigation menus (the core Menu UI module) Making lists, grids, and blocks from existing content (the core Views and Views UI modules) You can download additional contributed modules from the Drupal.org Module Downloads, or create your own custom modules. Related topics Sección 1.3, “Concept: Themes” Sección 1.4, “Concept: Distributions” 3 Entendiendo Drupal Sección 4.4, “Uninstalling Unused Modules” Sección 11.1, “Finding Modules” Sección 11.3, “Downloading and Installing a Module from Drupal.org” Sección 13.3, “Concept: Security and Regular Updates” Sección 13.6, “Updating a Module” Additional resources Drupal.org community documentation page "Module developer’s guide" Attributions Written by Jennifer Hodgdon. 1.3. Concept: Themes Prerequisite knowledge Sección 1.1, “Concepto: Drupal como Sistema de Gestión de Contenidos” What is a Theme? A theme is a set of files that define the visual look and feel of your site. The core software and modules that run on your site determine which content (including HTML text and other data stored in the database, uploaded images, and any other asset files) is displayed on the pages of your site. The theme determines the HTML markup and CSS styling that wraps the content. The core software provides several basic themes with the core distribution. These themes have largely been designed and built by the community over the last several years and will all be good choices for building your first sites and becoming more familiar with how the core software works. Drupal is a well-established CMS so the market for 3rd party themes - both free and paid - is very robust. If none of the 3rd party options suit your needs, you’ll need to create a custom theme. A custom theme can be as simple as a single CSS file that adds styling to the markup provided by the core software. Guidance for creating custom themes in Drupal 8 can be found in the Drupal.org community documentation page "Theming Drupal". Related topics Sección 11.4, “Finding Themes” 4 Entendiendo Drupal Sección 11.5, “Downloading and Installing a Theme from Drupal.org” Sección 1.2, “Concept: Modules” Additional resources Drupal.org community documenation page "Theming Drupal" Attributions Written and edited by John Grubb and Jennifer Hodgdon. 1.4. Concept: Distributions Prerequisite knowledge Sección 1.1, “Concepto: Drupal como Sistema de Gestión de Contenidos” Sección 1.2, “Concept: Modules” Sección 1.3, “Concept: Themes” What are Distributions? Distributions provide site features and functions for a specific type of site as a single download containing the core software, contributed modules, themes, and pre-defined configuration. A distribution makes it possible to set up a complex, use-specific site in fewer steps than installing and configuring elements individually. There are two main types of distributions: Full-featured Distributions A full-featured distribution is a project that provides a complete solution to set up a site for a specialized purpose such as academic, business, government, nonprofit, publishing, social, etc. For example, you could use an existing distribution for farmers markets to build your own website, or you could share your set-up for the farmers market site as a distribution for others to use. Other Distributions Distributions can also be quick-start tools that developers and site builders can use as a starting point. Related topics Sección 14.1, “Connecting with the Community” 5 Entendiendo Drupal Additional resources Drupal.org Drupal Distribution Downloads Attributions Adapted and edited by Diána Lakatos and Antje Lorch, from "Distributions" and "Download & Extend — Distributions" copyright 2000-2021 by the individual contributors to the Drupal Community Documentation. 1.5. Concept: Types of Data What are the types of data? The data and information on your site is divided up into four types, which are edited, translated, and stored differently. These four types are: Content Information (text, images, etc.) meant to be displayed to site visitors. This type of information tends to be relatively permanent, but can normally be edited. Configuration Information about your site that is not content, but is also relatively permanent, and is used to define how your site behaves or is displayed. It is sometimes also displayed to site visitors, but tends to be smaller pieces of text (like field labels, the name of your site, etc.) rather than larger chunks that you’d normally think of as Content. State Information of a temporary nature about the current state of your site, such as the time when cron jobs were last run. Session Information about individual site visitors' interactions with the site, such as whether they are logged in and their cookies. This is technically a subtype of State information, since it is also temporary. Related topics Sección 2.3, “Concept: Content Entities and Fields” Sección 13.1, “Concept: Cron” Sección 7.1, “Concept: Users, Roles, and Permissions” Sección 2.7, “Concept: User Interface, Configuration, and Content translation” 6 Entendiendo Drupal Attributions Adapted by Jennifer Hodgdon from "Overview of Configuration (vs. other types of information)", copyright 2000-2021 by the individual contributors to the Drupal Community Documentation 1.6. Concept: The Drupal Project Prerequisite knowledge Sección 1.1, “Concepto: Drupal como Sistema de Gestión de Contenidos” What is Free and Open Source Software? Free and Open Source Software (FOSS) is software that is developed by a community of people, released under a non-commercial license, and whose source code (the program files that make up the software) is freely available. For more information on the non-commercial license used by Drupal, see Sección 1.7, “Concept: Drupal Licensing”. What is the Drupal project? The Drupal project is a FOSS project whose purpose is to develop the core content management system software, as well as add-on modules, additional themes, translations, documentation, and special-purpose distributions. The people who contribute their time and money to the Drupal project come from all over the world, and are a diverse community that comes together for this common purpose. The community encompasses many smaller groups who perform many different tasks such as developing a particular piece of Drupal-related software, writing documentation, maintaining the security of Drupal software, translating Drupal software into a particular language, using Drupal for some specific purpose, and coming together to meet in person within a particular geographical area. For more on how you can connect to and communicate with the world-wide community, see Sección 14.1, “Connecting with the Community” and Sección 14.2, “Getting Support”. What is the Drupal Association? The Drupal Association is a non-profit organization dedicated to supporting the Drupal project and community. Its main functions are: Putting on large conventions around the world Maintaining the Drupal.org websites and the servers that they run on Promoting Drupal as a web platform Supporting Drupal education and training 7 Entendiendo Drupal Providing grants to the Drupal community in support of its mission Raising funds for these purposes Related topics Sección 1.7, “Concept: Drupal Licensing” Sección 13.3, “Concept: Security and Regular Updates” Sección 14.1, “Connecting with the Community” Sección 14.2, “Getting Support” Additional resources Drupal project governance Drupal Code of Conduct Attributions Written by Jennifer Hodgdon. 1.7. Concept: Drupal Licensing Prerequisite knowledge Sección 1.1, “Concepto: Drupal como Sistema de Gestión de Contenidos” What is Drupal Licensing? Drupal and all contributed files hosted on Drupal.org are licensed under the GNU General Public License (GPL), version 2 or later. That means you are free to download, reuse, modify, and distribute any files that are part of a project on Drupal.org under the terms of GPL version 2 or 3. You can also run the core software in combination with any code with any license that is compatible with version 2 or 3. Drupal contributors should follow these guidelines: All files (PHP, JavaScript, images, Flash, etc.) that are part of a project on Drupal.org have to be under GPL version 2 or later. All Drupal contributors retain copyright on their code, but agree to release it under the same license as Drupal. Drupal modules and themes are a derivative work of Drupal. If you distribute them, you must do so under the terms of GPL version 2 or later. 8 Entendiendo Drupal All content on Drupal.org itself is copyrighted by its original contributors, and is licensed under the Creative Commons Attribution-ShareAlike license 2.0. Sample code on Drupal.org is also available under GPL version 2 or later. Related topics Sección 14.1, “Connecting with the Community” Additional resources Drupal.org page on "Licensing" "Drupal 8 LICENSE.txt" page on api.drupal.org GNU General Public License, version 2 GNU General Public License, version 3 Creative Commons Attribution-ShareAlike license 2.0. "Legal Group" on groups.drupal.org Attributions Adapted by Diána Lakatos at Pronovix from "Licensing" copyright 2000-2021 by the individual contributors to the Drupal Community Documentation. 9 Capítulo 2. Planificación de un sitio web 2.1. Concept: Regions in a Theme Prerequisite knowledge Sección 1.3, “Concept: Themes” What is a region? Besides its primary content, a web page contains other content such as site branding (site name, slogan, and logo), navigation aids (menus, links, and icons), formatted text, and images. Each theme provides a set of named regions, such as Header, Content, and Sidebar, where site builders may choose to place their content. The available regions depend on the theme design. Only the Content region, which contains the primary content, is required; others are optional. The core Bartik theme provides the regions highlighted in the following image. 10 Planificación de un sitio web Related topics Sección 8.1, “Concept: Blocks” Sección 2.3, “Concept: Content Entities and Fields” Sección 8.3, “Placing a Block in a Region” Additional resources Drupal.org community documentation page "Assigning content to regions" Attributions Written and edited by John MacDonald, and Michael Lenahan at erdfisch. 2.2. Planning Your Site Layout Goal Plan the navigation and layout of the site, for both mobile and desktop browsers. Prerequisite knowledge Sección 1.3, “Concept: Themes” Sección 2.1, “Concept: Regions in a Theme” Sección i.6, “Escenario de guía” Steps It is a good idea to plan the site layout before you start building the site and writing content; however, your plan may need to be revised either before you start implementing it or after you have some of the site built with draft content in place, based on budgetary concerns or stakeholder feedback. 1. Make a list of the information that your site should present to visitors. In the farmers market scenario, this might include: Location of the market, with directions and a map Hours and days the market is open History of the market List of vendors Details about each vendor Searchable list of recipes Details about each recipe 11 Planificación de un sitio web List of the most recently added recipes 2. Decide which information should be on which pages or types of pages on the site: Information that should be on all pages Address, hours, and recently-added recipes list Vendor details pages Information about each vendor on its own page Recipe details pages Details of each recipe on its own page Home page Location, map, directions, and hours About page History of the market Vendors list page List of vendors, with links to vendor detail pages Recipe list page Searchable list of recipes, with links to recipe detail pages 3. Decide which information is the most important on each page. Site visitors using mobile phones or other small browsers will often only see the content that is presented first, and they may not scroll down to see all of the information. 4. Decide which of these pages should appear in the main site navigation. For instance, the main navigation might consist of the Home, About, Vendors, and Recipes pages. 5. Make a rough design sketch for each page, showing how it would look when viewed on a small screen such as a phone, as well as on a larger screen such as a desktop browser. Considering that most site visitors will be using smaller browsers, it is a good idea to start with the phone-size layout, to make sure that these visitors will be able to find the information they need without too much scrolling. In making these page layout plans, you might find that you need to revise your plan for which information should be on which pages. For example, you might decide that the address, hours, and recently-added recipes list would all fit well in the right sidebar area of all pages, when the site is viewed on desktop-sized browsers. On the other hand, you might decide that for mobile browsers, you would instead put the address and hours in a short format at the top of each page, but only display the recent recipe list at the bottom of the home page. Expand your understanding Sección 2.5, “Planning your Content Structure” 12 Planificación de un sitio web Videos Planning Your Site Layout Planning Your Site Layout Attributions Written by Jennifer Hodgdon. 2.3. Concept: Content Entities and Fields Prerequisite knowledge Sección 1.5, “Concept: Types of Data” Sección 1.2, “Concept: Modules” What is a content entity? A content entity (or more commonly, entity) is an item of content data, which can consist of text, HTML markup, images, attached files, and other data that is intended to be displayed to site visitors. Content entities can be defined by the core software or by modules. Content entities are grouped into entity types, which have different purposes and are displayed in very different ways on the site. Most entity types are also divided into entity sub-types, which are divisions within an entity type to allow for smaller variations in how the entities are used and displayed. Here is a table of some common content entity types: Entity type Entity sub-type Defining Module Main uses Content item Content type Node module Content intended to be the main page area for pages on the site Example: In the farmers market site example, you might have content types for basic pages, vendor pages, and recipe pages. Comment Comment type Comment module Commentary added to content entities (typically to Content item entities) Example: On a blog site, blog posts might have comments. They are not needed in the farmers market site example. User profile (none) User module 13 Data related to a person with a user Planificación de un sitio web Entity type Entity sub-type Defining Module Main uses account (login access) on the site Example: Every site has at least basic user profiles with user names and email addresses; social networking sites may have more complex user profiles with more information. Custom block Block type Custom Block module Text and images in smaller chunks, often displayed in the site header, footer, or sidebar Example: In the farmers market site example, you might put the hours and location in a sidebar block. Taxonomy term Vocabulary Taxonomy module Used to classify other types of content Example: In the farmers market site example, you might classify Recipe content with an Ingredients taxonomy vocabulary, with taxonomy terms like Carrots and Tomatoes. In a blogging site, blog posts might be classified using a Tags vocabulary, and perhaps also a Categories vocabulary. File (none) File module An image or attachment file that is tracked and managed by the site, often attached to other types of content Example: In the farmers market site example, both Recipe and Vendor pages might have image attachments, which would (behind the scenes) be managed as File entities by the site. Contact form Form type Contact module A form that lets site visitors contact site owners Example: A contact form is needed in the farmers market site example. What is a field? Within entity items, the data is stored in individual fields, each of which holds one type of data, such as formatted or plain text, images or other files, or dates. Field types can be defined by the core software or by modules. Fields can be added by an administrator on entity sub-types, so that all entity items of a given entity sub-type have the same collection of fields available. For example, the Vendor content type in the farmers market example might have fields for the vendor name, a logo 14 Planificación de un sitio web image, website URL, and description, whereas the Basic page content type might only have fields for the title and page body. When you create or edit entity items, you are specifying the values for the fields on the entity item. Related topics Sección 2.5, “Planning your Content Structure” Sección 5.2, “Creating a Content Item” Sección 6.1, “Adding a Content Type” Sección 6.5, “Concept: Taxonomy” Sección 7.1, “Concept: Users, Roles, and Permissions” Sección 8.1, “Concept: Blocks” Attributions Written and edited by Jennifer Hodgdon and Grant Dunham. 2.4. Concept: Modular Content Prerequisite knowledge Sección 2.3, “Concept: Content Entities and Fields” Sección 2.2, “Planning Your Site Layout” What is modular content? Given that the content of your site is stored in a database, it is desirable to make the content modular, meaning that certain pages on your site, rather than being edited as a whole page, are instead generated automatically from other content items. For instance, in the farmers market site scenario, you might create individual content items for recipes. If the recipe content items have a field that keeps track of ingredients, then your site could include a composite page that would list recipes, and allow visitors to search for a recipe that contained some particular ingredient they had bought at the market. Smaller sections of pages can also be generated as composites. For instance, recipe content items could have a field that keeps track of which vendor submitted the recipe (see Sección 6.4, “Concept: Reference Fields”), with the vendor details edited in separate vendor content items. This would allow you to do the following on your site: On each Recipe page, there could be an area that displays some information about the vendor that submitted the recipe, such as their name and market stall number. Each vendor page could have a section that lists the recipes they have submitted. 15 Planificación de un sitio web The key idea is that each piece of information is only edited in one place. When vendor information is updated, all recipe pages that display that vendor information are automatically updated; when a recipe is submitted by a vendor, it is automatically displayed on the vendor page. The core Views module is the usual way to use modular content to create composite pages and page sections; see Sección 9.1, “Concept: Uses of Views” for more information. Also, view modes are useful for defining different ways to display each content item; see Sección 6.10, “Concept: View Modes and Formatters” for more information. Related topics Sección 2.5, “Planning your Content Structure” Sección 6.1, “Adding a Content Type” Sección 6.3, “Adding Basic Fields to a Content Type” Sección 6.4, “Concept: Reference Fields” Sección 6.10, “Concept: View Modes and Formatters” Sección 9.1, “Concept: Uses of Views” Attributions Written by Jennifer Hodgdon. 2.5. Planning your Content Structure Goal Make a plan for the content structure of the site (which type and subtype of entity to use for which content), and which pages will contain listings of content. Prerequisite knowledge Sección 2.3, “Concept: Content Entities and Fields” Sección 2.4, “Concept: Modular Content” Sección i.6, “Escenario de guía” Steps 1. Brainstorm about what content your site needs to contain, which could include content that visitors would be looking for, as well as content that you want to show to visitors. The result could be the description in Sección i.6, “Escenario de guía”. 2. For each identified piece of content, decide which content entity type would be the best fit. In doing this, you’ll need to consider where and how the content will be used and 16 Planificación de un sitio web edited on the site. For example, in the farmers market site scenario, you might want to display the hours and location of the farmers market on the sidebar of every page. For that content, a single custom block makes sense. As another example, you might decide that pages displaying information about each vendor should be content items managed by the core Node module, because you want vendors to be able to edit their own listings. The core Node module permission system lets you do this easily. These decisions do not necessarily always have only one right answer; for instance, you could decide that vendor pages should be user profiles instead of content items, but if you did that the content would be tied to a specific user account, and it would not be as easy to later change the ownership of a vendor page to a different user account. 3. Within each content entity type you identified, decide what division into entity sub-types would make sense. For example, in the farmers market site example, you would probably decide that under the Content item entity type, there should be one content type for basic pages (Home and About), one for vendor pages, and one for recipe pages. 4. For each entity sub-type you decided on, decide what fields are needed. For instance, the Vendor content type might need fields for the vendor name, web page URL, image, and description. 5. Decide on what entity listings are needed, which could be entire pages or smaller areas on the page. For each listing, you’ll need to determine what entity items should be listed. Then you’ll need to decide in what order and with what filtering options they should be displayed; for example, you might want to give the site visitor the option to search by keyword, to filter the list down to a subset, or to sort the list. You’ll also need to decide what information from the entity items should be shown, which might result in adding to the list of fields you determined in the previous step. The farmers market site, for example, needs to have a Recipes listing page that lists content items of type Recipe, with the ability to filter by ingredients, so that means that the Recipe content type needs an Ingredients field. 6. For each identified field on each entity subtype, identify what type of data it should contain (such as plain text, formatted text, a date, an image file, etc.), and how many values should be allowed. Most fields are single-valued, but for example, a Recipe should allow for multiple values in its Ingredients field. 7. Consider which fields would be best as references to taxonomy term entities: fields whose values should be chosen from a list of allowed values. Allowed values that are expected to change and grow over time, are good candidates. An example is the Ingredients field for the Recipe content type. 8. Consider which fields should reference other content entities. An example is that since vendors will be submitting recipes, a field will be needed on the Recipe content type that references the Vendor content item for the vendor who submitted the recipe. Here’s an example of the resulting content structure for the farmers market scenario example site: Entity type Entity sub-type Examples Fields Content item Basic page Home page, about page Title, page body 17 Planificación de un sitio web Entity type Entity sub-type Examples Fields Content item Vendor A page for each Vendor name, page vendor at the market body, image, URL Content item Recipe A page for each submitted recipe Recipe name, page body, image, reference to Vendor who submitted it, Ingredients taxonomy Custom block (generic) Copyright notice for footer, Hours and location for sidebar No special fields Taxonomy term Ingredients Carrots, tomatoes, and other recipe ingredients No special fields Contact form (generic) Generic contact form Name, email, subject, message User profile (none) Will not be displayed No special fields on site And here are the listings the site needs: Page or page area Entity type and sub- Filter/sort/ type pagination Fields displayed Vendors page Vendor content items All vendors, alphabetical, paged Image, vendor name, trimmed body Recipes page Recipe content items Filter by ingredients, alphabetical, paged Image, recipe name Recent recipes sidebar Recipe content items List 5 most recent Image, recipe name Expand your understanding Sección 6.1, “Adding a Content Type” Sección 6.3, “Adding Basic Fields to a Content Type” Sección 6.6, “Setting Up a Taxonomy” Related concepts Sección 6.5, “Concept: Taxonomy” Videos Planning Your Content Structure 18 Planificación de un sitio web Planning Your Content Structure Attributions Written and edited by Jennifer Hodgdon and Grant Dunham. 2.6. Concept: Editorial Workflow Prerequisite knowledge Sección 1.1, “Concepto: Drupal como Sistema de Gestión de Contenidos” Sección 2.3, “Concept: Content Entities and Fields” What is an editorial workflow? An editorial workflow is the process organizations follow to create, review, edit, and publish content. Multiple people in different roles in the organization can be part of the process. For example, content creators could collect information and write content; editors could review, edit, ask for changes, and publish the content once it’s ready to be shared with the audience. Later on, content revisions could go through a simple process for small changes, or a more complex process with reviews for larger changes. What tools are available for managing workflows? Published/Unpublished status The Content item entity type supports marking each content item as either Published or Unpublished. Viewing permissions are separate for published and unpublished content; for example, all site visitors might be able to see published content items, while only content creators and editors can see unpublished content items. Revision tracking Some content entity types support revision tracking, meaning that as content is revised, the software stores the older revisions, so that they can be compared or reverted. Workflows The core Workflows module lets you define workflow states and transitions, beyond just having content be published or unpublished. The companion core Content Moderation module lets you assign permissions and roles to the workflow transitions. Both can be used with both Content item and Custom block entity types. Block placement The Custom block content entity lets you create a custom block and edit it, but only make it visible on the site once it is ready. 19 Planificación de un sitio web Related topics Sección 5.2, “Creating a Content Item” Sección 5.3, “Editing a Content Item” Sección 8.2, “Creating A Custom Block” Sección 8.3, “Placing a Block in a Region” Attributions Written and edited by Diána Lakatos at Pronovix, Grant Dunham, and Jennifer Hodgdon. 2.7. Concept: User Interface, Configuration, and Content translation Prerequisite knowledge Sección 1.5, “Concept: Types of Data” Sección 1.2, “Concept: Modules” Sección 2.3, “Concept: Content Entities and Fields” What languages does the software support? The base language for the software that your site runs (core software, modules, and themes) is English. However, using this software you can create a site whose default language is not English, in which case anyone viewing the site should see only that language (assuming that the site is fully translated). You can also use this software to create a multi-lingual site, with a language switcher that site visitors can use to switch to their preferred language. You need to have the core Language module installed in order to use a language other than English on the site. What can be translated on your site? There are three types of information that you can translate, each with its own method for translating: User interface text Built-in text present in the core software, modules, and themes. This can be translated from the base English language of the software into the language(s) of your site. Typically, rather than needing to translate this text yourself, you can download translations. You need to have the core Interface Translation module installed in order 20 Planificación de un sitio web to translate this text, and the core Update Manager module installed in order to automatically download translations. Configuration text Text whose structure and initial values are defined by the core software, modules, and themes, but that you can edit. Examples include the labels for fields in your content types, header text in views, your site name, and the content of automatic email messages that your site sends out. After creating configuration text in the default language of your site, you can translate it into other languages. For default configuration supplied by the core software, modules, and themes, translation is included with the downloads of user interface text translations. You need to have the core Configuration Translation module installed in order to translate this text. Content text and files If your site is multilingual, you can configure the content fields on your site to be translatable. After creating content in one language, you can translate it into other languages. Fields can contain textual information or uploaded files, and for each field on each content type, you can configure it to be translatable or non-translatable. You need to have the core Content Translation module installed in order to translate this text. What information will remain in English on my site? Even if the default language of your site is not English, you will still see English text on certain administrative pages used to manage configuration. The reason is that when you edit configuration, you are editing the base, untranslated configuration values; translating configuration is a separate operation. For example, if you visit the Menus administration page, you will see menu names in English (for the menus that were set up when you installed your site), and if you click an Edit menu link, you will be editing the English name and description of the menu. To edit the menu name in a different language, you would need to have the core Configuration Translation module installed, and use the Translate link to edit the translated menu information. Related topics Sección 10.1, “Adding a Language” Sección 10.2, “Configuring Content Translation” Sección 10.3, “Translating Content” Sección 10.4, “Translating Configuration” Attributions Written by Jennifer Hodgdon. 21 Capítulo 3. Instalación 3.1. Concept: Server Requirements What are the requirements for running the core software? Disk space The total amount of disk space needed for your site is not a fixed amount, as it depends on your site. The base files for the core software take up about 100 MB on the web server. You will need more space if you install additional modules or themes, and you’ll also need space for media, backups, and other files generated by and uploaded to your site. The database also uses disk space, although that is typically not in the same area (and in some cases, not even on the same server) as that used by the site files. PHP PHP 7.2 or higher. PHP must be set up with a minimum memory size of 64MB; if you are running multiple modules on your site or using memory-intensive PHP-based commandline tools (such as Composer), considerably more memory than that may be needed. Certain PHP extensions are also required; the exact list of required PHP extensions depends on how you install the core software and which modules you are using on your site. Generally, hosting service providers have installed all the PHP extensions you will need. If you are self-hosting or running your site on your local computer, you will get error messages during installation if any required PHP extensions are missing, and should be able to install them and continue. Web server Apache (Recommended) Apache is the most commonly used web server. The core software will work on Apache 2.x hosted on UNIX/Linux, OS X, or Windows that have the Apache mod_rewrite module installed and enabled. The Apache VirtualHost configuration must contain the directive AllowOverride All to allow the.htaccess file to be used. PHP Local Server You can temporarily run a local demo site on your computer using just PHP, without installing web server software. Nginx Nginx is a commonly used web server that focuses on high concurrency, performance and low memory usage. The core software will work on Nginx 1.1 or greater hosted 22 Instalación on UNIX/Linux, OS X, or Windows. The ngx_http_rewrite_module must be installed and enabled. Hiawatha Hiawatha is a web server with a strong focus on security. It also aims at being easy to use and lightweight. Research performed by independent researchers proves that Hiawatha offers a performance comparable to other web servers under normal conditions, but much better while under attack. URL Toolkit must be installed and configured to rewrite URLs. Microsoft IIS Microsoft IIS is a web server and set of feature extension modules for use with Microsoft Windows. The core software will work with IIS 5, IIS 6, or IIS 7 if PHP is configured correctly. Because clean URLs are required, you may need to use a third party product. For IIS 7, you can use the Microsoft URL Rewrite module or a third party solution. Database Use one of the following databases: MySQL - 5.5.3 (MariaDB 5.5.20, Percona 5.5.8) or higher with an InnoDB-compatible primary storage engine PostgreSQL - 9.1.2 or higher SQLite - 3.4.2 or higher. Temporary local demo sites use SQLite, which is distributed as part of PHP and doesn’t require installing separate database software. Additional resources Drupal.org community documentation page "System requirements" PHP Runtime Configuration (PHP memory limit and other settings) Attributions Adapted by Karl Kedrovsky, Brian Emery, and Jennifer Hodgdon from "System requirements", copyright 2000-2021 by the individual contributors to the Drupal Community Documentation. 3.2. Concept: Additional Tools What tools are available for site builders? There are several additional tools available that help you create sites faster, more accurately and with less effort. 23 Instalación Drush and Drupal Console See below for more about command-line tools. Git See below for more about version control tools. Composer See below for more about Composer. Devel The contributed Devel module helps with development tasks such as debugging and inspecting code, analyzing database queries, and generating dummy content. What are command-line tools? Command-line tools provide an alternative to using the administrative interface for various operations on your site. Many site builders and maintainers have invested the time to install and learn a command-line tool, because: Administrative tasks are typically faster and less tedious when performed at the command line than in the user interface. You can write scripts that combine site-related commands with other commands on the server, to automate more complicated tasks. Command-line tools provide additional functionality not available via the administrative interface; for example, running database queries. The most popular tools are Drush and Drupal Console. Drush has been available longer, and has commands for both the core software and contributed modules; Drupal Console started as a tool for module programmers, but has a growing list of commands for site builders. This guide documents commands from the latest stable version of Drush for many tasks; it does not document Drupal Console commands or commands for older versions of Drush, but you can look them up in the Drupal Console and Drush documentation. To use these tools, you will need to have command-line terminal access to the server where your website will be hosted, and you will need to install Composer first in order to install either the Drush or Drupal Console tool. What is a version control system? A version control system is software that keeps copies of files and revision history in a repository, and allows you to add, delete, and update files. For a web site project, revision control software can help you: Test locally before deploying files on the live site Look at, compare with, and revert to previous versions of files 24 Instalación Look at the added, changed, or deleted files before you commit the changes (update the repository) Merge changes from different team members together Keep files and configuration synchronized between local and live sites There are many proprietary and open-source version control systems to choose from; a popular choice is Git, which is open-source software that runs on most computer platforms. Git is a distributed version control system that allows you to have one or more copies of your repository, which allows you to commit changes to a copy and then only push them to the repository you’ve designated as canonical when you’re ready to share them with others. The canonical git repository can be hosted on your local computer or a server at your company, but many software projects and individuals host their Git repositories using thirdparty services provided by GitLab or GitHub. What is Composer used for? Composer is a tool for managing PHP dependencies, where the developer specifies what version of each external library is needed, and Composer manages the process of downloading and installing the libraries. The core software is a primary user of Composer, because it makes use of several externallydeveloped software libraries, which must be downloaded and installed in order for the core software to work. When you install the core software, you either need to download an archive that contains compatible versions of the external libraries, or you need to run Composer to download the external libraries after the initial download. The Drush and Drupal Console command-line tools are also downloaded using Composer. Some contributed modules also make use of externally-developed software libraries; for example, a Facebook integration module might require Facebook’s integration library to be installed for the module to work, and a geographical module might make use of a standard library of geographical functions. To install a module with external dependencies, you will need to run Composer. What tools are available for module and theme developers? In addition to the site builder tools mentioned above, the following tools are useful for module and theme developers. Drupal Console Drupal Console is a command-line tool that generates boilerplate code and interacts with a Drupal site. It can generate, for example, block or form code, install modules and themes, and create dummy content. Drupal Console makes use of the Symfony Console. Coder Coder is a command-line tool that checks if your modules and themes comply with coding standards and other best practices. It can also fix coding standard violations. 25 Instalación Browser debugging tools Web browsers such as Firefox and Chrome include tools that allow viewing, editing, debugging, and monitoring CSS, HTML, and JavaScript. You can open the debugging pane or window by right-clicking the mouse in an area of your window, and choosing "Inspect" or "Inspect element". Related topics Sección 3.5, “Using Composer to Download and Update Files” Additional resources Drupal.org community documentation page "Development tools" Drupal.org community documentation page "Using Composer with Drupal" Wikipedia article "Distributed version control" Attributions Written and edited by Boris Doesborg and Jennifer Hodgdon. Some text adapted from "Introduction to Git", copyright 2000-2019 by the individual contributors to the Drupal Community Documentation. 3.3. Concept: Methods for Downloading and Installing the Core Software Prerequisite knowledge Sección 3.2, “Concept: Additional Tools” Sección 3.1, “Concept: Server Requirements” Sección 1.4, “Concept: Distributions” What methods are available for downloading the core software? Before you can build a site, you will need to first download the core software. Depending on your plans, there are several ways that you can download the core software: Try a free online demo If you are evaluating whether or not to use Drupal to build a site, you can use an online provider to get a demo installation of the core software in 20 minutes or less. See the Drupal.org page "Try Drupal". 26 Instalación Use a one-click installer from your hosting provider If you choose to install the core software at your hosting provider, your hosting provider may have specific documentation and/or a one-click install that you can use. See Drupal.org’s list of hosting providers that support Drupal. Use a pre-configured environment Use a pre-configured environment or virtual machine that contains Drupal and all the required supporting software to install Drupal locally. See the section for your operating system under Drupal.org’s Local server setup guide for possible options. Download manually from the web site If you plan to build a site without add-on modules that have complicated dependencies, you can download the core software, or a distribution that contains the core software and additional modules or themes, from the web site. See Sección 3.6, “Downloading the Core Software Manually” for instructions. Use Composer If you plan to use the Drush tool (see Sección 3.2, “Concept: Additional Tools”), or if you are building a site that might use modules with complicated dependencies, you should use Composer to download the core software, because Composer will manage the dependencies properly. If you start your site by downloading manually, however, you can convert to using Composer to manage dependencies later. See Sección 3.5, “Using Composer to Download and Update Files” for downloading and conversion instructions. What happens when I install the core software? Installing the core software means setting up some database tables, configuration, and an administrative user account, so that you can build and use your site. What methods are available for installing the core software? There are several ways to install the core software: Behind-the-scenes installer If you choose to use an online demo or one-click installer from a hosting provider, the core software may be installed for you automatically. Interactive installer The core software has an interactive installer that presents you with several on-line forms, and then completes the installation using the information you provide in the forms. See Sección 3.4, “Preparing to Install” and Sección 3.7, “Running the Interactive Installer”. Demo site installer If you download the core software to your local computer, you can quickly create a temporary demo site that uses the built-in web server and SQLite database that are 27 Instalación part of PHP. The command to set up a demo site is given at the end of Sección 3.6, “Downloading the Core Software Manually”. In this case, you will not run the interactive installer. Command-line tool Command-line tools (see Sección 3.2, “Concept: Additional Tools”) can also be used to perform the installation steps. Attributions Written and edited by Drew Gorton, Michael Lenahan at erdfisch, Jennifer Hodgdon, and Jojy Alphonso at Red Crackle. 3.4. Preparing to Install Goal Download the core software, and handle any required prerequisites. Prerequisite knowledge Sección 3.1, “Concept: Server Requirements” Sección 3.2, “Concept: Additional Tools” Sección 3.3, “Concept: Methods for Downloading and Installing the Core Software” How to install and configure server software (if installing on your own computer) How to set up hosting for a generic web site How to create a database Site prerequisites Server software must be installed on the computer where you plan to host your site. See Sección 3.1, “Concept: Server Requirements”. Depending on how you plan to download the core software, you may need to install additional software tools first. See Sección 3.3, “Concept: Methods for Downloading and Installing the Core Software” and Sección 3.2, “Concept: Additional Tools”. Steps 1. Choose methods for downloading and installing the core software, from those listed in Sección 3.3, “Concept: Methods for Downloading and Installing the Core Software”. The 28 Instalación rest of these instructions apply to the Composer and manual download options and the interactive installer; if you chose other options, the software should be installed for you. 2. Set up a URL and hosting for your site on the server. Verify that the hosting is working by putting a simple HTML file in the web root directory of the hosting, and visiting the URL for your site. 3. Create a database, along with a database user account with full access. 4. Download the core software files to the web root directory, using the method you decided on. See Sección 3.3, “Concept: Methods for Downloading and Installing the Core Software” for links to instructions. Expand your understanding See Sección 3.7, “Running the Interactive Installer” to run the interactive installer. Alternatively, you can use the following Drush command, from inside the directory that you downloaded the software to, where DB_NAME, DB_USER and DB_PASS are your database’s credentials: drush site-install standard --db-url='mysql://DB_USER:DB_PASS@localhost/DB_NAME' - Videos Preparing to Install Preparing to Install Additional resources Drush Attributions Written and edited by Drew Gorton, Michael Lenahan at erdfisch, Jennifer Hodgdon, and Jojy Alphonso at Red Crackle. 3.5. Using Composer to Download and Update Files Goal Use Composer to download or update files and dependencies in the core software, or in add-on modules and themes. Skip this topic if you are not using Composer. 29 Instalación Prerequisite knowledge Sección 3.2, “Concept: Additional Tools” Site prerequisites If you want to use Composer, it must be installed either on a local development server or your live site. See Sección 3.2, “Concept: Additional Tools”. Steps If you are unable to install the Composer tool on your live server, you can follow the steps in any of the sections below on your local server, and then transfer any updated or added files to your live server. The recommended procedure is to make an archive or zip file of the new and changed directories, transfer the archive to your live server, delete the directories that have changed, and extract the archive. Make sure to check for updates and additions to the following files, in the root of your installation: vendor directory autoload.php composer.json composer.lock Using Composer to download the core software Follow these steps if you have not yet downloaded or installed the core software, and you want to use Composer to download both the core software and its external dependencies: 1. At the command line, change to one level above the directory where you want the software to reside. 2. Enter this command, where mydir is the directory you want to create: composer create-project drupal-composer/drupal-project:8.x-dev mydir --no-inter 3. The latest release of the core software will be downloaded to the mydir/web subdirectory; you’ll also get some extra tools such as Drush and Drupal Console in the mydir/ vendor directory. Converting a previously-downloaded site to use Composer If you previously downloaded the core software without using Composer, you may find later that you want or need to use Composer to manage and update dependencies. To convert your existing site to using Composer, enter the following commands at the root of your site: composer global require grasmash/composerize-drupal composer composerize-drupal --composer-root=. --drupal-root=. Note that this will also make modules, themes, and profiles that you previously downloaded without using Composer available to Composer, if they were placed in the modules/contrib, 30 Instalación themes/contrib, and profiles/contrib directories. If you placed them in another location, you might consider deleting previously-downloaded modules and themes, and then following the instructions below to re-download them using Composer. Using Composer to download a module or theme Follow these steps if you are already using Composer to manage the core software, and you want to use Composer to add a contributed module or theme with its dependencies. 1. Each time you want to add a contributed module or theme, determine the project’s short name. This is the last part of the URL of the project page; for example, the Geofield module, at https://www.drupal.org/project/geofield, has short name geofield. 2. To download the contributed module or theme, along with its external dependencies, enter the following command at the root of your site (substituting the short name of the module or theme for geofield): composer require drupal/geofield Using Composer to update previously-downloaded files Follow these steps to update the files for the core software or a contributed module or theme, after having already started to manage dependencies with Composer: 1. Determine the short name of the project you want to update. For the core software, it is core. For contributed modules and themes, it is the last part of the URL of the project page; for example, the Geofield module, at https://www.drupal.org/project/geofield, has short name geofield. 2. If you want to update to the latest stable release, use the following command, substituting the short name of the project to be updated for geofield: composer update drupal/geofield --with-dependencies 3. If you need a specific version, determine how to enter the version number you want to update to. For example, for version 8.x-1.7 of a contributed module, you would enter just the 1.7, and for the core software version 8.3.1, you would enter 8.3.1. Then enter the following command at the root of your site (substituting the short name of the project for geofield and the correct version number): composer require drupal/geofield:1.7 Expand your understanding You can learn more about Composer commands by using Composer’s built-in help system. For example, to learn more about the create-project command, enter composer help create-project in your command window. Videos Using Composer and Git to Download Files 31 Instalación Using Composer and Git to Download Files Additional resources "Using Composer to manage Drupal site dependencies" "Update core via Composer" Composerize Drupal project for converting a previously-downloaded site to using Composer Attributions Adapted by Jennifer Hodgdon, Hans Fredrik Nordhaug, and Joe Shindelar at Drupalize.Me from "Using Composer to manage Drupal site dependencies", copyright 2000-2021 by the individual contributors to the Drupal Community Documentation. 3.6. Downloading the Core Software Manually Goal Download the core software or a distribution manually. Skip this topic if you are downloading using some other method. Prerequisite knowledge Sección 1.4, “Concept: Distributions” Sección 3.3, “Concept: Methods for Downloading and Installing the Core Software” Steps 1. Go to https://www.drupal.org and navigate to Build > Download & Extend in the top-level menu. 32 Instalación 2. If you want to download just the core software, click the Download Drupal zip or download tar.gz link, and save the file to your local machine. 3. If you want to download a distribution, click the Distributions icon or link, choose a distribution from the list, click through to its project page, and click the link to download a zip or tar.gz file to your local machine. The link looks like this: 4. Upload the downloaded file to your hosting account. Log in to the control panel and navigate to the HTML directory. Save the file there. 5. Uncompress the tar.gz or zip file, which will create a new directory. If you do not have terminal access, or your hosting server is not running Linux, your hosting control panel’s file manager should provide a way to extract the files. If you have terminal access to your hosting server (running Linux), you can use a command like: tar -xzf drupal-8.3.2.tar.gz 6. Delete the compressed file from the server, unless your unpacking method already deleted it. 7. Rename the directory or reconfigure your web hosting, so that the directory name matches the directory your web hosting is configured to use for your site. Expand your understanding Once you have the software downloaded, you can install a temporary demo site (see Sección 3.3, “Concept: Methods for Downloading and Installing the Core Software”) by running the following command from the top-level directory of the core software: php core/scripts/drupal quick-start standard The demo site will be installed, and your web browser should open to log in to the new site, which will only run as long as the PHP command is active. To learn more about this functionality, use its help command: php core/scripts/drupal quick-start --help Videos Downloading the Core Software Manually Downloading the Core Software Manually Attributions 33 Instalación Written and edited by Drew Gorton, Michael Lenahan at erdfisch, Jennifer Hodgdon, and Jojy Alphonso at Red Crackle. 3.7. Running the Interactive Installer Goal Install the core software and create the admin account by running the included installer. Site prerequisites Sección 3.4, “Preparing to Install” Steps 1. If you are using a 1-click install from a hosting provider or demo site, you will most likely see some or all of the following screens as part of the installation process. If you uploaded the core files manually or using Composer, to start the installer, open a browser and visit the URL that you set up for your hosting. 2. Select a language on the first page of the installer; for example, English. You could optionally choose from any of the other listed languages. The language files for the chosen language will be downloaded and installed so that the rest of the installation process can be finished in the chosen language. After choosing a language, click Save and continue. 3. Select an installation profile. Installation profiles provide site features and functions for a specific type of site as a single download containing the core software, contributed 34 Instalación modules, themes, and pre-defined configuration. Core contains two installation profiles. Select the core Standard installation profile. Click Save and continue. 4. The next step in the installer will verify that your system meets the minimum requirements. If it does not, you’ll be presented with an outline of what needs to be corrected in order to proceed. If it does, the installer will automatically advance to the next step. 5. Provide details of the database you created in the Sección 3.4, “Preparing to Install” chapter. Then click Save and continue. Field name Explanation Value Database name The custom name given to the database drupal8 Database username Username created databaseUsername Database password Password chosen 35 Instalación 6. The next step will display a progress bar under the heading Installing Drupal. After the installer has completed, it will automatically advance to the next step. 7. The final step is to configure some basic information about your new site. Note that the user account you create in this step is the site’s admin account. See Sección 7.2, “Concept: The User 1 Account” for important information about this unique account. You can safely name this account "admin", and make sure to choose a secure and unique password. 36 Instalación Fill in the form with the following information: Field name Explanation Value Site name The name chosen for the site Anytown Farmers Market Site email address The email associated with the site [email protected] Username The designated user’s credentials admin Password The password chosen Confirm password Repeat the password Email address The user’s email [email protected] The remaining fields can likely be left at their default values. 37 Instalación 38 Instalación 8. Click Save and continue. 9. You will be redirected to the front page of your new site and you should see the message Congratulations, you installed Drupal! displayed at the top of the page. Expand your understanding Check the Status Report to see if there are any problems with the installation. See Sección 12.5, “Concept: Status Report”. Related concepts Sección 11.7, “Concept: Development Sites” Sección 3.2, “Concept: Additional Tools” Videos Running the Installer Running the Installer Additional resources Drupal.org community documentation page "Create A Database" Attributions Written and edited by Joe Shindelar at Drupalize.Me, and Jojy Alphonso at Red Crackle. 39 Capítulo 4. Configuración básica del sitio 4.1. Concept: Administrative Overview Prerequisite knowledge Sección 1.3, “Concept: Themes” Sección 1.2, “Concept: Modules” What is the administrative menu? The toolbar provided by the core Toolbar module displays the Manage administrative menu at the top or left side of the site, for users with permission to see it. This menu provides access to all of the administrative areas of the site. The menu entries will vary depending on which modules are active on your site and the permissions of the person viewing the menu; if you install using the core Standard installation profile and have full administrative permissions, the top-level entries are as follows: Content Lists and manages existing content, and allows creation of new content. Structure Contains a list of links for managing structural elements of the site, such as blocks, content types, menus, and taxonomy. Appearance Manages themes and appearance-related settings. Extend Manages the installation and uninstallation of modules. Configuration Contains links to settings pages for various site features. 40 Configuración básica del sitio People Manages users, roles, and permissions. Reports Contains links to logs, update information, search information, and other information about the site’s status. Help Lists help topics for installed modules that provide them. The arrow button on the far right side of the second line of the toolbar (or far left side, if the site is being viewed using a right-to-left-reading language like Arabic) can be used to switch the menu from appearing horizontally at the top of the page, to a vertical format on the left side (or right side, in right-to-left languages). When viewed vertically, the menu becomes an interactive tree. 41 Configuración básica del sitio This guide has a standard way to describe navigation to administrative pages using the administrative toolbar. See Sección i.5, “Convenciones en la guía” for more information. What are contextual links? Some administrative and editing functionality on the site can be accessed through the contextual links displayed by the core Contextual Links module. Contextual links take you to 42 Configuración básica del sitio some of the same pages that you can access through the administrative menu, but instead of having to navigate through the menu hierarchy, these links are provided near where the related content is displayed on your site. Contextual links have to be activated to be visible. If your site’s theme uses the default styling for contextual links, a pencil icon is used to indicate that contextual links are present and activated, and if you click the icon, you will see the contextual links. There are two ways to activate the pencil icons that provide access to the contextual links: If you are using a mouse in a browser, the icon will temporarily appear when you hover over an area that has related contextual links. You can click the master pencil icon (or its Edit link) at the right end of the top bar in the toolbar, which will activate all of the contextual links on the current page. This icon is only visible on pages with contextual links. Attributions Written by Scott Wilkinson and Jennifer Hodgdon. 4.2. Editando la información básica del sitio web Objetivo Modificar información básica del sitio web como Nombre del sitio, Lema, Zona horaria predefinida. Conocimientos previos Sección 4.1, “Concept: Administrative Overview” 43 Configuración básica del sitio Pasos Configurando la información básica del sitio web 1. En el menú de administración Administrar, navegar hacia Configuración > Sistema > Configuraciones básicas del sitio (admin/config/system/site-information) para modificar el Nombre del sitio, Lema, Dirección de correo electrónico administrativo, o la ruta de la Página inicial pred