Skip to content

Instantly share code, notes, and snippets.

@abenevaut
Last active March 9, 2024 23:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abenevaut/5595056 to your computer and use it in GitHub Desktop.
Save abenevaut/5595056 to your computer and use it in GitHub Desktop.

Main things always have to remember it when we integrate a PyroCMS theme.

<title>{{ settings:site_name }} | {{ template:title }}</title>

<base href="{{ url:base }}"/>


{{ theme:css file="FILE.css" }}
{{ theme:js file="FILE.js" }}
{{ theme:image file="FILE.EXT" }}
{{ theme:path }}


{{ if theme:options:OPTION == 'yes' }}
{{ endif }}

{{ if {url:segments segment="1"} == "" }}
{{ endif }}

{{ theme:favicon }}
{{ theme:favicon file="apple-touch-icon.png" rel="apple-touch-icon" }}
{{ theme:favicon file="apple-touch-icon-precomposed.png" rel="apple-touch-icon" }}
{{ theme:favicon file="apple-touch-icon-57x57-precomposed.png" rel="apple-touch-icon" }}
{{ theme:favicon file="apple-touch-icon-72x72-precomposed.png" rel="apple-touch-icon" }}
{{ theme:favicon file="apple-touch-icon-114x114-precomposed.png" rel="apple-touch-icon" }}


{{ asset:css file="FILE.css" file_min="FILE.min.css" group="theme-css" }}
{{ asset:js file="FILE.js" file_min="FILE.min.js" group="theme-js" }}
{{ asset:render group="theme-css" }}
{{ asset:render group="theme-js" }}


<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script>window.jQuery||document.write('{{ theme:path }}/js/commun/jquery-1.9.1.min.js')</script>

<script>
  window.debug = true;

	if (window.debug) {
		console.log("[THEME LOG : ON]");
	}

	var SITE_URL = "{{ url:site }}";
	var BASE_URL = "{{ url:base }}";
</script>

{{ global:current_language }}

{{ template:metadata }}
{{ template:title }}
{{ template:body }}

{{ page:title }}
{{ page:body }}

{{ pages:chunk id=page:id name="content-title" }}

{{ navigation:links group="header" }}


{{ if user:logged_in }}
  <li><a href="{{ url:site uri='my-profile' }}">{{ user:display_name }}</a>
    <ul>
      {{ if settings:enable_profiles }}
       	<li>
       		<a href="{{ url:site uri='my-profile' }}">{{ helper:lang line="edit_profile_label" }}</a>
        </li>
      {{ endif }}

      {{ if user:has_cp_permissions }}
      	<li>
       		<a href="{{ url:site uri='admin' }}" target="_blank">{{ helper:lang line="global:control-panel" }}</a>
       	</li>
      {{ endif }}
  
      <li>
    			    <a href="{{ url:site uri='users/logout' }}">{{ helper:lang line="logout_label" }}</a>
      </li>
    </ul>
  </li>
{{ else }}
  <li><a href="{{ url:site uri='users/login' }}">{{ helper:lang line='user_login_btn' }}</a>
    <ul>
      <li>
     	  <a href="{{ url:site uri='users/login' }}">{{ helper:lang line='user_login_btn' }}</a>
     	</li>
     	<li>
     		<a href="{{ url:site uri='register' }}">{{ helper:lang line="user_register_btn" }}</a>
     	</li>
    </ul>
  </li>
{{ endif }}


<p>© 2012-{{ helper:date format="Y" }} <a href="{{ url:site }}">{{ settings:site_name }}</a> {{ helper:lang line="all_right_reserved" }}</p>


{{ integration:analytics }}
<?php defined('BASEPATH') OR exit('No direct script access allowed');
/**
*
*/
class Theme_ extends Theme
{
public $version = '1.0.0';
public $options = array(
'show_breadcrumbs' => array('title' => 'Show Breadcrums',
'description' => 'Would you like to display breadcrums?',
'default' => 'yes',
'type' => 'radio',
'options' => 'yes=Yes|no=No',
'is_required' => TRUE),
);
public $name = '';
public $author = 'Antoine Benevaut';
public $description = '';
public $website = '';
public $author_website = 'http://www.cavaencoreparlerdebits.fr';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment