I am just starting a new project with the new PHP system. How do I create a new content page based on a layout page?
When I create a new file it adds all of the head tag info and everything and does not allow me to select a layout page.
I am just starting a new project with the new PHP system. How do I create a new content page based on a layout page?
When I create a new file it adds all of the head tag info and everything and does not allow me to select a layout page.
Is it not definable within the App Properties options when you click on 'App' in the structure like it is in Node Brad?
Nope, that is what I expected. But that is not an option. Maybe I am just not creating the page properly? How do you add a new page?
The generated index page code:
<!-- Wappler include head-page="layouts/main" bootstrap5="local" is="dmx-app" id="index" appConnect="local" fontawesome_5pro="cdn" -->
<meta name="ac:route" content="/">
The code for a new page:
<!doctype html>
<html>
<head>
<script src="/dmxAppConnect/dmxAppConnect.js"></script>
<meta charset="UTF-8">
<title>Untitled Document</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="/bootstrap/5/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-rqn26AG5Pj86AF4SO72RK5fyefcQ/x32DNQfChxWvbXIyXFePlEktwD18fEz+kQU" crossorigin="anonymous" />
<link rel="stylesheet" href="/css/style.css" />
</head>
<body id="home" is="dmx-app">
<script src="/bootstrap/5/js/bootstrap.bundle.min.js"></script>
</body>
</html>
You add Content and Layout pages in the Project Folder (in Node), Content Pages are created in Pages and Layouts in layouts etc (unless you created custom directories for these respectively):
Perfect! I was in file view and didn't have that option. In Page view I have it and it works perfectly.
Thanks man! ![]()
Glad I could help Brad. Pretty simple soon as you wrap your head around this way of working, and allows for a wide scoping approach (nicely organise all the things).