Skip to content

Commit

Permalink
Update requirements for stability
Browse files Browse the repository at this point in the history
  • Loading branch information
andrevanzuydam committed Dec 26, 2023
1 parent 17f23fd commit b21d55a
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Run the CMS
composer start 8080
```

Open up the CMS to setup the admin user
Open up the CMS to set up the admin user

http://localhost:8080/cms/login -> will get you started

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"tina4stack/tina4php": "dev-master",
"tina4stack/tina4php": "^2.0",
"ext-json": "*"
},
"scripts": {
Expand Down
18 changes: 8 additions & 10 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
(new Content())->addCmsMenu("/backend/program", "Products");
//(new Content())->addCmsMenu("/backend/program", "Something Else");
//(new Content())->addCmsMenu("/backend/program", "Products");
// $config->addTwigGlobal("Menu", new Menu());
//$config->addTwigGlobal("Menu", new Menu());
//(new Theme())->addTwigView("product", "Products", "examples/products.twig");
//(new Theme())->addTwigView("menu", "Menu", "examples/menu.twig");
(new Theme())->addTwigView("menu", "Menu", "examples/menu.twig");
});

//Hack to build css for documentation
Expand Down
8 changes: 7 additions & 1 deletion src/app/Content.php
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,13 @@ public function addConfigMethods(Config $config): void
global $DBA;

if ($DBA === null) {
die("Please install the composer dependency for SQLite3\n'composer require tina4stack/tina4php-sqlite3'\n and create a database global for using the CMS in your index.php file\nThe default code you can copy from the next 2 lines:\nglobal \$DBA;\n\$DBA = new \Tina4\DataSQLite3(\"cms.db\");\n");
if (class_exists("\Tina4\DataSQLite3")) {
$DBA = new \Tina4\DataSQLite3("cms.db");
} else {
echo "Could not connect to database, please check your database settings: composer require tina4stack/tina4php-sqlite3\n";
die();
}

}

$migration = new \Tina4\Migration(__DIR__ . "/../../migrations");
Expand Down
8 changes: 8 additions & 0 deletions src/templates/examples/products.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<h1> TEST PRODUCTS </h1>

<ul>
<li> Product One </li>
<li> Product Two </li>
<li> Product Three </li>
<li> Product Four </li>
</ul>

0 comments on commit b21d55a

Please sign in to comment.