Skip to content

Commit

Permalink
Small extensibility fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagocamposviana committed Dec 28, 2013
1 parent b648b07 commit f584830
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 43 deletions.
2 changes: 1 addition & 1 deletion Resources/views/content/article/line.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<div class="attribute-byline">
<span class="date">
<small><time itemprop="datePublished" datetime="{{location.contentInfo.publishedDate|date("Y-m-d")}}">{{ location.contentInfo.publishedDate|localizeddate( 'short', 'short', app.request.locale ) }}</time><</small>
<small><time itemprop="datePublished" datetime="{{location.contentInfo.publishedDate|date("Y-m-d")}}">{{ location.contentInfo.publishedDate|localizeddate( 'short', 'short', app.request.locale ) }}</time></small>
</span>
{% if not ez_is_field_empty( content, 'author' ) %}
<span class="author" itemtype="http://schema.org/Person" itemscope="itemscope" itemprop="creator"><small>
Expand Down
73 changes: 31 additions & 42 deletions Resources/views/pagelayout.html.twig
Original file line number Diff line number Diff line change
@@ -1,35 +1,29 @@
<!DOCTYPE html>
<html lang="{{ app.request.locale|split('_')[0] }}" prefix="hx: http://purl.org/NET/hinclude# og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
<head>
{% set language = (siteaccess[ezpublish.siteaccess.name].language) %}

{% set language = (siteaccess[ezpublish.siteaccess.name].language) %}
{% if location is not defined %}
{% set location = null %}
{% endif %}

{% if location.pathString is defined %}
{% set title %}
{{ render( controller( "tutei:showComponent", { 'name':'Title', 'parameters':{'pathString': location.pathString } } ) ) }}
{% endset %}
{% set title %}{{ render( controller( "tutei:showComponent", { 'name':'Title', 'parameters':{'pathString': location.pathString } } ) ) }}{% endset %}
{% elseif content is defined %}
{% set title %}
{{ content.contentInfo.name }} / (location ID is #{{ location.id }})
{% endset %}
{% set title %}{{ content.contentInfo.name }} / (location ID is #{{ location.id }}){% endset %}
{% elseif title is not defined %}
{% set title %}
{{ name|default( 'Home' ) }}
{% endset %}

{% set title %}{{ name|default( 'Home' ) }}{% endset %}
{% endif %}

{% block meta_title %}

<title>{{ title }}</title>

{% endblock %}

<meta charset="utf-8">
<!--[if IE]><meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">

{% block meta_base %}
{#
<meta name="description" content="..." />
Expand All @@ -39,10 +33,9 @@
<meta name="keywords" content="..." />
<!-- For google news, up to 10 keywords separeted by comma -->
<meta name="news_keywords" content="..." />
#}
{% endblock %}

{% block meta_og %}
{#
<meta content="..." property="og:title" />
Expand All @@ -54,7 +47,6 @@
<meta property=”fb:admins” content=”USER_ID”/>
#}
{% endblock %}

{% block meta_twitter %}
{#
<meta property=”twitter:card” content="..." />
Expand All @@ -64,19 +56,16 @@
<meta property=”twitter:image” content="..." />
#}
{% endblock %}

{% block meta_author_link %}
{#
<link rel="author" href="..."/>
#}
{% endblock %}

{% block meta_link_canonical %}
{#
<link rel="canonical" href="..."/>
#}
{% endblock %}

{% block meta_link_next_prev %}
{#
<link rel='prev' href='http://yoast.com/cat/seo/' />
Expand All @@ -86,7 +75,9 @@


{% image '@TuteiBaseBundle/Resources/public/images/icon.png' %}

<link rel="shortcut icon" type="image/png" href="{{ asset_url }}" />

{% endimage %}

{# CSS used in all pages #}
Expand All @@ -97,7 +88,9 @@
{% stylesheets
"@TuteiBaseBundle/Resources/public/css/print.css"
filter='cssrewrite' %}
<link rel="stylesheet" href="{{ asset_url }}" media="print" />

<link rel="stylesheet" href="{{ asset_url }}" media="print" />

{% endstylesheets %}

{# Scripts used in all pages #}
Expand Down Expand Up @@ -190,29 +183,25 @@
{{ render( controller( "tutei:showComponent", { 'name' : 'Banners','parameters' : {'pathString': location.pathString } } ) ) }}
{% endif %}

{% block sidemenu %}

{% set enable_side_menu = false %}
{% if show_side_menu
and content is defined
and content.contentInfo.contentTypeId not in hide_side_menu_type_id_array
and location.pathString is defined
and location.pathString|split('/')[3] != '' %}

{% set enable_side_menu = true %}
{% endif %}
{% set enable_side_menu = false %}
{% if show_side_menu
and content is defined
and content.contentInfo.contentTypeId not in hide_side_menu_type_id_array
and location.pathString is defined
and location.pathString|split('/')[3] != '' %}

{% if enable_side_menu %}
<div class="col-md-3">
{{ render( controller( "tutei:showComponent", { 'name':'SideMenu',
'parameters': { 'pathString': location.pathString } } ) ) }}
{{ render( controller( "tutei:showComponent",
{ 'name':'ExtraInfo',
'parameters': { 'pathString': location.pathString } } ) ) }}
</div>
{% endif %}
{% set enable_side_menu = true %}
{% endif %}

{% endblock %}
{% if enable_side_menu %}
<div class="col-md-3">
{{ render( controller( "tutei:showComponent", { 'name':'SideMenu',
'parameters': { 'pathString': location.pathString } } ) ) }}
{{ render( controller( "tutei:showComponent",
{ 'name':'ExtraInfo',
'parameters': { 'pathString': location.pathString } } ) ) }}
</div>
{% endif %}

<main role="main" id="content" class="col-md-{% if enable_side_menu %}9{% else %}12{% endif %}" tabindex="-1">
{% block breadcrumb %}
Expand Down Expand Up @@ -241,7 +230,7 @@

</div> <!-- /container -->

<hr>
<hr />

{% include 'TuteiBaseBundle::parts/footer.html.twig' %}

Expand Down

0 comments on commit f584830

Please sign in to comment.