Please can anyone help me create a new page template that has a 3 column grid by default, rather than having to use a full page and each time add a layout, or duplicating and existing page.
Ive tried reading the documentation and it talks about creating code for this which i cant do.
Stack don’t let me add a layout either so that’s no use.
Any help is much appreciated, thank you!
Steevb
October 29, 2024, 8:17am
2
What theme and which CMS version are you using?
It’s default Atomik Core Version - 9.2.4
Steevb
October 30, 2024, 4:13pm
4
Try using ‘three-column’ code below as a new template (three_column.php).
t<?php
defined('C5_EXECUTE') or die("Access Denied.");
use Concrete\Core\Area\Area;
$view->inc('elements/header.php');
?>
<?php
$a = new Area('Page Header');
$a->enableGridContainer();
$a->display($c);
?>
<div class="container">
<div class="row">
<div class="col-md-4 col-sidebar">
<?php
$a = new Area('Left-Column');
$a->display($c);
?>
</div>
<div class="col-md-4">
<?php
$a = new Area('Main');
$a->display($c);
?>
</div>
<div class="col-md-4 col-sidebar">
<?php
$a = new Area('Right-Column');
$a->display($c);
?>
</div>
</div>
</div>
<?php
$a = new Area('Page Footer');
$a->enableGridContainer();
$a->display($c);
?>
<?php
$view->inc('elements/footer.php');ype or paste code here
Thanks Steevb, where do I place this file please?
mhawke
October 31, 2024, 1:32am
6
I’ll jump in since I’m here
It goes in [root]/concrete/themes/atomik/three_column.php
Be careful to trim some extra characters from the code (‘t’ a the beginning and everything after the final ‘;’)
Then head to Dashboard → Pages and Themes → Page Templates and ‘Add Template’.
Name : “Three Column”
Handle: “three_column”
Now that template should be available on the page under Page Settings → Design
1 Like