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

Stop EE from adding to URLs?

How Do I?

ricknew's avatar
ricknew
19 posts
6 years ago
ricknew's avatar ricknew

I’ve set up a URL scheme using channels and for the anchor tags I’m using

href="{site_url}{url}"

All is good except when I’m on sub-pages. For instance the main menu is “http://localuntye.com/Before-The-Wall/Liner-Notes” all is good. However, now when I’m on this page the main menu changes to “http://localuntye.com/Before-The-Wall/Before-The-Wall/Liner-Notes” (note the extra “Before-The-Wall”.

Is there anyway to prevent this behavior?

Thanks!

Rick

       
ricknew's avatar
ricknew
19 posts
6 years ago
ricknew's avatar ricknew

The {url} is Liner-Notes

       
ricknew's avatar
ricknew
19 posts
6 years ago
ricknew's avatar ricknew

Sorry for the post, went back through the code and found a missing {site_url}

       
Rob Allen's avatar
Rob Allen
2,950 posts
6 years ago
Rob Allen's avatar Rob Allen

Have a look at the url_title_path variable.

Assuming you have a template group called Before-The-Wall/

{ url_title_path = 'Before-The-Wall/index' }

will output https://sitename.com/Before-The-Wall/your-entry-url-title

PS remove the spaces in the code example!

       
ricknew's avatar
ricknew
19 posts
6 years ago
ricknew's avatar ricknew

Thanks, Rob! I’ll give that a go.

Where are the spaces in the code example?

       
Rob Allen's avatar
Rob Allen
2,950 posts
6 years ago
Rob Allen's avatar Rob Allen

The forum doesn’t render EE tags properly, adding spaces makes the code display 😊

       
ricknew's avatar
ricknew
19 posts
6 years ago
ricknew's avatar ricknew

Sorry, Rob. I’m still clueless, could you send me a screenshot?

       

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.