forked from croogo/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
designers documents
- Loading branch information
Showing
6 changed files
with
148 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
Sistema de repliegue | ||
#################### | ||
|
||
Es completamente aceptable si no quieres crear todas y cada una de las vistas de tu plantilla. Por ejemplo, si `app/View/Themed/MyTheme/Users/add.ctp` no se encuentra, CakePHP intentara localizar `app/View/Users/add.ctp`. | ||
|
||
Sistemas de repliegue adicionales para Nodos | ||
============================================ | ||
|
||
En las plantillas, Croogo soporta distintos tipos de repliegues para nodos, y cualquier archivo de vista que encuentre primero es renderizado. Debajo hay una lista de 4 acciones para el Controlador NodesController donde se soportan las vistas adicionales. | ||
|
||
index | ||
----- | ||
|
||
- `app/View/Themed/MyTheme/Nodes/index_{tipo}.ctp`: donde {type} es el alias del tipo de contenido. Por ejemplo 'blog' | ||
- `app/View/Themed/MyTheme/Nodes/index.ctp` | ||
- `app/View/Nodes/index.ctp` | ||
|
||
search | ||
-------- | ||
|
||
- `app/View/Themed/MyTheme/Nodes/search_{tipo}.ctp` | ||
- `app/View/Themed/MyTheme/Nodes/search.ctp` | ||
- `app/View/Nodes/search.ctp` | ||
|
||
term | ||
---- | ||
|
||
- `app/View/Themed/MyTheme/Nodes/term_{id}.ctp`: donde {id} is el identificador del Termino | ||
- `app/View/Themed/MyTheme/Nodes/term_{tipo}.ctp` | ||
- `app/View/Themed/MyTheme/Nodes/term.ctp` | ||
- `app/View/Nodes/term.ctp` | ||
|
||
view | ||
---- | ||
|
||
- `app/View/Themed/MyTheme/Nodes/view_{id}.ctp`: donde {id} es el identificador del Nodo. | ||
- `app/View/Themed/MyTheme/Nodes/view_{type}.ctp` | ||
- `app/View/Themed/MyTheme/Nodes/view.ctp` | ||
- `app/View/Nodes/view.ctp` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Estructura de archivos | ||
###################### | ||
|
||
Cada plantilla esta identificada por su alias unico. Si tienes una plantilla en el directorio `app/View/Themed/MiTema`, Entonces el alias de tu plantilla sera MiTema. | ||
|
||
Un archivo `theme.json` tambien es requerido. Puedes ver el archivo JSON usado en la plantilla por defecto aqui: `theme.json <http://github.com/croogo/croogo/blob/1.4/webroot/theme.json>`_. | ||
|
||
Estructura | ||
========== | ||
|
||
Por ejemplo, si tienes una plantilla con el alias MiTema. Todos tus archivos deberan estar ubicados de la siguiente manera: | ||
|
||
- app/View/Themed/MiTema/ | ||
- Elements/ | ||
- Helpers/ | ||
- custom.php | ||
- Layouts/ | ||
- default.ctp | ||
- Nodes/ | ||
- view.ctp | ||
- ... | ||
- webroot/ | ||
- css/ | ||
- theme.css | ||
- js/ | ||
- theme.js | ||
- img/ | ||
- screenshot.png | ||
- theme.yml | ||
|
||
No olvides el archivo theme.json. Tu tema no estara disponible en el panel de administracion si no se encuentra este archivo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Archivo JSON | ||
######### | ||
|
||
Un archivo theme.json es requerido para cada tema en Croogo. Este es requerido porque ahi se almacena informacion util como los menus y regiones que usa. De esta manera le permite a Croogo hacer peticiones a la base de datos y estar disponible sin romper el esquema MVC. | ||
|
||
El contenido de un ejemplo de theme.json puede ser encontrado en: `app/View/Themed/MyTheme/webroot/theme.json` y se muestra abajo :: | ||
|
||
{ | ||
"name" : "Sample", | ||
"description" : "Sample theme for Croogo", | ||
"screenshot" : "screenshot.png", | ||
|
||
"author" : "Author Name", | ||
"authorEmail" : "[email protected]", | ||
"authorUrl" : "http://authorswebsite.com", | ||
|
||
"menus" : [ | ||
"main", | ||
"footer" | ||
], | ||
|
||
"regions" : [ | ||
"right" | ||
] | ||
} | ||
|
||
- name: El nombre de la plantilla | ||
- description: La descripcion de la plantilla | ||
- screenshot: Una vista preliminar de tu plantilla, ubicada en `app/View/Themed/MyTheme/webroot/img/screenshot.png` | ||
- author: tu nombre | ||
- authorEmail: tu email | ||
- authorUrl: tu pagina web | ||
- menus: una lista de menus que la plantilla usa | ||
- regions: una lista de regiones que tu plantilla usa para mostrar bloques | ||
- vocabularies (opcional): una lista de alias de vocabularios que tu plantilla usa. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Empaquetado | ||
########### | ||
|
||
Crea un archivo zip con el directorio `app/View/Themed/MyTheme`. Despues podra ser cargado desde el panel de administracion. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Funciones de plantillas | ||
####################### | ||
|
||
Todas las funciones especificas de los temas (en case de ser necesarias) van en el CustomHelper. Si el alias de tu plantilla es MiTema, el CustomHelper debera estar ubicado en `app/View/Themed/MiTema/Helpers/CustomHelper.php`. | ||
|
||
:: | ||
|
||
<?php | ||
class CustomHelper extends Helper { | ||
|
||
public function myCustomMethod() { | ||
// code here | ||
} | ||
|
||
} | ||
|
||
CustomHelper es cargado automaticamente para ser usado de la siguiente manera en tus vistas (archivos .ctp) | ||
|
||
$this->Custom->miMetodoPersonalizado(); |