Hello, I am new to expression and I cant figure out how to add static pages. My website currently has about 30 pages and every one of them is static with its own design and information.
I want to add a blog, so so far, I have the blog and my home page figured out, how to add additional static pages. Also, how do I setup the links in my site menu, I’m having problems making that work as well. Im running on a local server on windows via xampp, so I’m having issues with paths.
There are multiple ways of doing this. The simplest and most direct approach is creating a template group and template for each page. Let’s say you want to create an “About Us” page, you would simply create a template group called about-us. By default that will already have a blank index template. You can add whatever html you want in that. You can then link to that page via:
https://example.com/template_group/template or in this case https://yoursite.com/about-us
Any other templates you create in that template group such as a Teams page will look like this:
https://yoursite.com/about-us/teams
Depending on your preference or site needs, there are better ways to achieve this using more basic EE template tags or utilizing an add-on like Structure but that should get you started.
As for site navigation you can do this manually by having static links in your html (not very fun, I know), you can build your own taking advantage of some of the EE’s core functionality like conditionals (better but can still be kind of tedious), r you can use an add-on that make it much easier to manage. Structure has this functionality built in and is now included with EE, plus it is simple to include in your template.
I’d suggest the 1st party Structure module here. With that you’d get several options:
With some creative use of custom fields you may be able to whittle the number of templates needed right down which makes management easier.
Setting up your website with static pages and a blog can be like mastering the art of KinitoPET – challenging but rewarding! For your menu links, ensure the paths are correct, considering your local server setup. Keep tinkering, and you’ll get it!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.