-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some code snippets and base templates as examples for bootstrapping n…
…ew site.
- Loading branch information
1 parent
3c60776
commit 084a8dd
Showing
5 changed files
with
41 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<? | ||
// bitrix/php_interface/init.php | ||
require_once '/downloaded/beatrix.phar'; | ||
Beatrix::init(array( | ||
Beatrix::SETTINGS_TEMPLATES_DIR => $_SERVER['DOCUMENT_ROOT'].'/.tpl' // where to look for templates | ||
)); | ||
//Beatrix::view()->addFolder('email', '<somewhere else folder>'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<? | ||
// Just | ||
Beatrix::templateFooter(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<? | ||
// capture anything printed on site before template rendering | ||
Beatrix::templateHeader(); | ||
|
||
// if you want to automate sections depending on addresses | ||
Beatrix::layout()->sectionsDefaults([ | ||
// empty default sections | ||
'/' => [ | ||
'sidebar.left.top' => '', | ||
'sidebar.left.middle' => '', | ||
'sidebar.left.bottom' => '', | ||
'sidebar.right.top' => '', | ||
'sidebar.right.middle' => '', | ||
'sidebar.right.bottom' => '', | ||
], | ||
// any sub-page has left menu | ||
'/.+' => [ | ||
'sidebar.left.top' => ['layout/snippets/sidebar-menu-left'], | ||
], | ||
// but not in search page | ||
'/search/?.+' => [ | ||
'sidebar.left.top' => '', | ||
] | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?=$this->section('content'); |