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

Get Channel Entries for URL Title

Development and Programming

motorstormer's avatar
motorstormer
17 posts
11 years ago
motorstormer's avatar motorstormer

Sorry to keep bothering you, but this site is important.

None of those worked.

What do I do if Mission + Values has a subpage?

       
Boyink!'s avatar
Boyink!
5,011 posts
11 years ago
Boyink!'s avatar Boyink!

Just to recap:

  • Your URL is: http://yoursite.com/index.php/about/missions-vision

  • You have a template group named /about (case sensitivity is important here)

  • The about/index template has:

{exp:channel:entries channel="about"}
{title}
{other_fields}
{/exp:channel:entries}
  • The short name of the About channel is “about” (again, case sensitivity here).

  • You have an entry in the About channel with the url_title of missions-vision that is set to an Open status, has no expiration date, and a publish date not set in the future.

If all of those are true the content should load.

If it doesn’t load there is something goofy about the install, or there are HTACCESS rules still in place, or possibly a Template Route has been setup that is getting in the way.

Let’s get this to load before worrying about additional content (and again, there is no such thing as a “subpage” in EE-speak, just another entry that has to appear at a deeper URL).

       
motorstormer's avatar
motorstormer
17 posts
11 years ago
motorstormer's avatar motorstormer

When I use mysite.com/index.php/about and

{exp:channel:entries channel="about"}
...
{/exp:channel:entries}

It tries to load both ‘about’ then ‘mission-vision’. i.e. it loops through all ‘about’ channel entries.

       
Boyink!'s avatar
Boyink!
5,011 posts
11 years ago
Boyink!'s avatar Boyink!

Yep - that’s how EE works. You aren’t being any more specific by the URL so the entries tag doesn’t know which entry you want and returns everything. If you add /about or “/mission-vision” to the URL it should only return that entry.

       
motorstormer's avatar
motorstormer
17 posts
11 years ago
motorstormer's avatar motorstormer

That doesn’t help, I need subpages of the channel to show up with content…that’s where Structure helped.

       
Boyink!'s avatar
Boyink!
5,011 posts
11 years ago
Boyink!'s avatar Boyink!

Again, set aside the subpages idea for now. You need to get past thinking about sites as a collection of pages in order to fully get the value of EE. We can get there without using Structure but you are trying to run before you walk.

Does the specific content come up when you add the url-title to the URL?

       
motorstormer's avatar
motorstormer
17 posts
11 years ago
motorstormer's avatar motorstormer

Yes, about/about and about/mission-vision work perfectly. Do I just use segment_1, segment_2, etc…?

       
Boyink!'s avatar
Boyink!
5,011 posts
11 years ago
Boyink!'s avatar Boyink!

OK - from here to get deeper URLS you have a number of options, but you need to understand that you’ll be working a bit outside of EE’s default way of handling URLs/

1 - Use dynamic=”no” url_title=”{last_segment}” as parameters (but understand this may open up the ability to have junk urls in segments before the last one).

2 - Use the 1st party Pages module to create a specific URL for specific entry and map it to a template.

3 - Use same-channel relationships to create hierarchy and navigation (I have an example of this in my book).

4 - Look at 3rd party nav-building tools like Nav-ee or Taxonomy that allow you to create a hierarchy and then map each node to a template and content entry.

All of these methods are less intrusive than Structure.

Which one to use might depend on the rest of the site and URL requirements found in those other areas. I try to be as native as possible with my builds because the more 3rd party addons you use the harder it is to update a build when EE updates.

       
motorstormer's avatar
motorstormer
17 posts
11 years ago
motorstormer's avatar motorstormer

Thank you so much for your help. The Pages module looks like it will work fine.

       
motorstormer's avatar
motorstormer
17 posts
11 years ago
motorstormer's avatar motorstormer

Can you build navigation from the Pages module? I have just included a PHP file with an array that echoes the navigation based on the array.

       
Boyink!'s avatar
Boyink!
5,011 posts
11 years ago
Boyink!'s avatar Boyink!

https://ellislab.com/expressionengine/user-guide/add-ons/channel/channel_entries.html#show-pages

       
1 2

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.