Skip to content

Instantly share code, notes, and snippets.

View HenderOrlando's full-sized avatar

Hender Orlando HenderOrlando

  • Pempo
View GitHub Profile
{% include '_page_3Col_panel_center.html.twig' with {
media : {
tipo : 'img',
sources : [
{
src : 'url/a/la/imagen',
}
]
},
botones : {
{% include '_titulo_breadcrumb.html.twig' with {
pre_title : 'Pre'
title : 'Ppal',
url : 'Url',
id : 'id',
class : 'class',
attrs : 'attrs',
post_title : 'post',
search : {action: 'action/para/search'},
breadcrumbs : [{
{% include '_mmenu_item.html.twig' with {
title : Titulo del item,
texto : Texto del item,
canonical : Canonical del titulo del item,
subtitle1 : Subtitulo 1,
subtitle2 : Subtitulo 2,
url : Url de la caja,
url_img : Url de la imágen,
url_asset : Url de la imágen para usar con asset,
} %}
{% include '_page_3Col_mmenu.html.twig' with {
list : [
{
title : 'Capacitación Pempo',
canonical : 'capacitacion-pempo',
texto : 'Capacitación para los que se registren de como hacer una página web usando la herramienta de Dreamweaver.',
subtitle1 : 'Inicia el 10 de Abril',
subtitle2 : 'Colombia/Cúcuta/',
url : 'capacitacion-1-10-abril-2014',
url_img : asset('imagenes/eventos/capacitacion.jpg' ),
{% include '_page_3Col_panel.html.twig' with {
side : 'right'
breadcrumb {
pre_title : 'Pre'
title : 'Ppal',
url : 'Url',
id : 'id',
class : 'class',
attrs : 'attrs',
post_title : 'post',
{% include '_page_3Col_header.html.twig' with {
list : [
{
title : 'Eventos',
canonical : 'eventos',
url : 'url/eventos/'
}
]
}%}
{% include '_page_3Col.html.twig' with {
boxes_left : {
'side' : 'left',
'breadcrumb': {
ver_sesion : true,
search : {action: 'action/para/search'},
},
'boxes' : [
{
is_row : true,
{% include 'page_3Col.html.twig' with {
boxes_left : {
'side' : 'left',
'breadcrumb': {
ver_sesion : true,
search : {action: 'action/para/search'},
},
'boxes' : [
{
is_row : true,
@HenderOrlando
HenderOrlando / render_twigjs.js
Last active August 29, 2015 13:57
En el ejemplo vemos que la plantilla llamada "TemplateName" recibe un arreglo llamado "dato". Tener en cuenta que la plantilla llamada "templateName" debe pasarse como variable, es decir, sin comillas, como lo estamos viendo.
var output = Twig.render(templateName, {
dato: [
{
url : 'url/from/js',
class : 'class-js',
attrs : 'attrs=""',
heading : 'JS Loaded',
text : 'Plantilla cargada desde JS',
badge : {
url : 'url/Badge',
@HenderOrlando
HenderOrlando / _scroll
Created March 6, 2014 20:37
Si scroll es padre pueden usarse los Block's y si es incluida pueden usar las Var's
Block's Var's
orientated_scroll orientated Orientación "horizontal" o "vertical"
Scroll
class_scroll class_scroll Clases extra.
id_scroll id_scroll Id.
attrs_scroll attrs_scroll Atributos extra.
Header
header_scroll twig_header Nombre de la plantilla a incluir en el encabezado.
datos_twig_header Datos necesarios para la plantilla definida en twig_header.
header Contenido a incluir. Si se define twig_header no se usa.