forked from kongondo/Padloper2Starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_init.php
48 lines (41 loc) · 1.39 KB
/
_init.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
namespace ProcessWire;
/**
* Initialize variables output in _main.php
*
* Values populated to these may be changed as desired by each template file.
* You can setup as many such variables as you'd like.
*
* This file is automatically prepended to all template files as a result of:
* $config->prependTemplateFile = '_init.php'; in /site/config.php.
*
* If you want to disable this automatic inclusion for any given template,
* go in your admin to Setup > Templates > [some-template] and click on the
* "Files" tab. Check the box to "Disable automatic prepend file".
*
*/
// Variables for regions we will populate in _main.php
// Here we also assign default values for each of them.
$title = $page->get('headline|title');
$content = $page->body;
// @note: currently not in use
$sidebar = $page->sidebar;
// the section just below the main nav or carousel
$sectionHeader = __("Store");
$sectionSubHeader = "";
$sectionURL = "/products/";
// -----------
// if to show carousel
$isShowCarousel = false;
// if to show carousel
$isShowSectionBackArrow = false;
// if to show side cart
$isShowCart = true;
// for non-shop pages (e.g. 'basic-page' might need extra markup)
$isShopPage = true;
// ---------
// We refer to our homepage a few times in our site, so
// we preload a copy here in $homepage for convenience.
$homepage = $pages->get('/');
// Include shared functions
include_once("./_func.php");