Skip to content

Instantly share code, notes, and snippets.

@arfaram
Last active June 30, 2016 20:22
Show Gist options
  • Save arfaram/abbf0cdcfb3bf29c9a293e76b352d455 to your computer and use it in GitHub Desktop.
Save arfaram/abbf0cdcfb3bf29c9a293e76b352d455 to your computer and use it in GitHub Desktop.
eZPlatform bundle configuration
{# after creating Basic Page Content Type#}
{# more infos: https://www.youtube.com/playlist?list=PLjJ-Vvy1P3FuUikg6rvdAtXeJG00Ynh_z#}
{% extends "ProjectAppBundle::pagelayout.html.twig" %}
{% block content %}
<h1>{{ ez_content_name(content) }}</h1>
<div class="row">
<div class="col-md-8">{{ ez_render_field(content, 'body') }}</div>
<div class="col-md-4">Siedbar</div>
</div>
{% endblock %}
#import definition in app/config/config.yml
#imports:
#- {resource: "@ProjectAppBundle/Resources/config/config.yml"}
###########################################
assetic:
bundles: [ ProjectAppBundle ]
#import definition in app/config/ezplatform.yml
#imports:
#- {resource: "@ProjectAppBundle/Resources/config/ezplatform.yml"}
###########################################
ezpublish:
siteaccess:
list:
- site1
groups:
project1_group:
- site1
match:
Map\Host:
dev.site1.com: site1
www.site1.com: site1
system:
default:
user:
layout: pagelayout.html.twig
project1_group:
location_view:
full:
basic_page_full:
template: ProjectAppBundle:full:basic_page.html.twig
match:
Identifier\ContentType: basic_page
vehicle_full:
template: ProjectAppBundle:full:vehicle.html.twig
match:
Identifier\ContentType: vehicle
site1:
content:
tree_root:
location_id: !!!!!!!YOUR-ROOT-LOCATION-HERE!!!!!!!
view_cache: true
ttl_cache: true
default_ttl: 604800
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
{% block stylesheets %}
{% stylesheets
"@ProjectAppBundle/Resources/public/css/bootstrap.min.css"
"@ProjectAppBundle/Resources/public/css/bootstrap-theme.min.css"
"@ProjectAppBundle/Resources/public/css/appbundle.css"
output='css/style.css'%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
{% endblock %}
</head>
<body>
<div class="container">
<div class="page-header">
<p><a href="/">eZPlatform examples</a></p>
</div>
{% block content %}{% endblock %}
{% block javascript %}
{% javascripts
'@ProjectAppBundle/Resources/public/js/jquery.min.js'
'@ProjectAppBundle/Resources/public/js/bootstrap.min.js'
'@ProjectAppBundle/Resources/public/js/appbundle.js'
output='js/script.js' %}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock %}
</div>
</body>
</html>
{# after creating Vehicle Content Type#}
{# more infos: https://www.youtube.com/playlist?list=PLjJ-Vvy1P3FuUikg6rvdAtXeJG00Ynh_z#}
{% extends "ProjectAppBundle::pagelayout.html.twig" %}
{% block content %}
<h1>{{ ez_content_name(content) }}</h1>
<div class="row">
<div class="col-md-8">{{ ez_render_field(content, 'body') }}</div>
<div class="col-md-4">Siedbar</div>
</div>
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment