ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Remove http://yoursite.com/index.php from {page_url}

August 12, 2009 2:06pm

Subscribe [1]
  • #1 / Aug 12, 2009 2:06pm

    newvibes

    28 posts

    I’m wondering how to get {page_url} to spit out the url of the page without the first section of the url… for example

    I want
    /menu/breakfast/

    instead of
    http://yoursite.com/index.php/menu/breakfast/

    Any advice would be greatly appreciated.

  • #2 / Aug 12, 2009 2:12pm

    Lisa Wess

    20502 posts

    Hi, newvibes - is this for the Pages module?

  • #3 / Aug 12, 2009 2:14pm

    newvibes

    28 posts

    Hi Lisa,

    Yes. I need to do it for the pages and also for category_url_title if possible.

  • #4 / Aug 12, 2009 2:16pm

    newvibes

    28 posts

    I guess for page_url I’d just use url_title instead. But what about category_url_title ?

  • #5 / Aug 12, 2009 2:34pm

    Lisa Wess

    20502 posts

    for page_url you’d just use page_uri instead. 

    Also, please check your email in a few minutes.

  • #6 / Aug 12, 2009 2:39pm

    MarqueDigital

    33 posts

    I registered the newvibes account 2 years ago when I was investigating EE. I’ll use this one from now on which is associated with a license 😊

  • #7 / Aug 12, 2009 2:57pm

    Lisa Wess

    20502 posts

    Thanks MarqueDigital =)  If you do want to take it up as a support credit, do let me know via responding to that email.

  • #8 / Aug 13, 2009 5:55am

    MarqueDigital

    33 posts

    So, there’s no real way of doing this? I’d like to try and do it on the EE side because I’m outputting it into an XML template which is going into a flash application. Alternatively I could just do a string split / explode type method on it to remove the string.

  • #9 / Aug 13, 2009 12:56pm

    Lisa Wess

    20502 posts

    Er, didn’t see my answer above?  use {page_uri} instead of {page_url}.  See {page_uri}.

  • #10 / Aug 13, 2009 1:03pm

    MarqueDigital

    33 posts

    No, I saw that. That only works for pages though. I’m looking for a solution for category post permalinks also, see post #3.

  • #11 / Aug 13, 2009 2:08pm

    Lisa Wess

    20502 posts

    For category_url_titles the only option would be to create your own custom category field and fill it in and use that.

    Or you could use PHP to strip out the domain.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases