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

Structure and URL Segment Variables

Development and Programming

Glenda Sims's avatar
Glenda Sims
2 posts
16 years ago
Glenda Sims's avatar Glenda Sims

I’m madly in love with the Structure extension. I’ve almost finished building (the bare bones) of my first site in EE. In the last template, I want to use the URL Segment Variable feature of EE, but I can’t seem to get it to work.

My “course info” page shows up fine at

http://foo.com/curriculum/foundation/internet-fundamentals/

So I thought I could just add url_title=”{segment_4} like so:

{exp:weblog:entries weblog="courses" url_title="{segment_4}”}

And then add on the word /comp/ to the end of the URL in the browser address bar

http://foo.com/curriculum/foundation/internet-fundamentals/comp/

And I expected to land on the same page..but with the additional info of “comp” available to me in segment_4…so I could choose to display specific “comp”-like info on that page.

But …when I go to http://foo.com/curriculum/foundation/internet-fundamentals/comp/, it doesn’t work…EE thinks http://foo.com/curriculum/foundation/internet-fundamentals/comp/ doesn’t exist.

Is the URL Segment Variable feature available to me if I’m using the Structure Extension? If so, is there some special syntax or a setting I need to correct?

       
MeanStudios's avatar
MeanStudios
335 posts
16 years ago
MeanStudios's avatar MeanStudios

I’ve had a similar problem using this module. The {segment_#} variables work with what template is assigned to a particular page. So if you have a page http://example.com/testimonies/ and it’s assigned to template group “about-us” and template “testimonies” then {segment_1} would be “about-us” and {segment_2} would be “testimonies”.

       

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.