We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Create a new page from a category link and populate it with entries from that category.

How Do I?

Sunnyland's avatar
Sunnyland
66 posts
6 years ago
Sunnyland's avatar Sunnyland

I previously had this working on an older site, but because of shared hosting between sites, I need to update the PHP version, which causes the old EE 2.6 site to not work… meaning I’ve had to rebuild it in EE 5.1.

The rebuild has been pretty straightforward and simple, except for this last thing. (And non working email form plugin, which I hope to solve next).

All the channels, categories and entries have been set up and seem to be working on the home page, but when trying to navigate to one of the menu links (for example about) –> (site path)/index.php/(category), it goes to an error page like this:

Error The page you requested was not found.

The expected result is that it reloads the index page (one main template for all pages) but with a new url segment, which tells the channel codes for each type of content which category to render posts from.

Below is the menu code which works on the old site, and leads to an error page on the new one:

<div class="top_nav">
  {exp:channel:categories category_group="1" style="nested"}
   <a href="http://{path=%27{category_url_title}%27}" title="{category_name}" class="{if ">{category_name}</a>
  {/exp:channel:categories}
 </div>

The menu outputs correctly, and links to the expected url, but the page doesn’t show up.

Perhaps this is due to a change in how something is done from the old version to this version, or perhaps something needs to be configured somewhere to make it work - either way, I presume everyone has to deal with this to create any kind of dynamic content on their site across multiple pages, so there has to be an answer to it.

       
Sunnyland's avatar
Sunnyland
66 posts
6 years ago
Sunnyland's avatar Sunnyland

OK So it turns out that in System Settings > Content & Design > Template Settings >

There is a setting called ‘Enable Strict URLs’, which was enabled by default. Disabling this caused the pages to show up, though with much of the channel content missing.

After some experimentation, I was able to get some of the content to appear by deleting and re-posting the entries (no real understanding of why this worked), and with other non-category-specific content, I was able to make it show up by adding some parameters to the channel tag, as follows…

{exp:channel:entries channel="contact" orderby="date" sort="desc" limit="1" dynamic="no"}

I believe that dynamic=”no” is what fixed this, as the template seems to have been trying to determine that I didn’t want the content to appear on some pages, in some way based on the URL? I’m not sure about that, but it seems to have worked!

Now I just have to work out why my email form no longer works! (I will make a new post).

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.