With regards to the generating links, try creating an app_helper.php
file and overriding the url() method, like this:

class AppHelper extends Helper {

  function url($url = null, $full = false) {
    $url = parent::url($url, $full);
    $baseUrl = parent::url('/', $full);

    if (substr($url, 0, strlen($baseUrl)) != $baseUrl) {
      // External url - ignore
      return $url;
    }

    // Strip off the base part
    $url = substr($url, strlen($baseUrl));

    // Replace slashes with dashes
    $url = r('/', '-', $url);

    // Tack the base back on
    $url = $baseUrl . $url;
    return $url;
  }
}

You see, if you have an AppHelper defined, it works just like
AppController and AppModel - all declared helpers inherit from it. Not
just app-level helpers -- lib helpers too: HtmlHelper::link() will
call HtmlHelper::url() which is not defined and therefore goes to your
AppHelper::url().

Then using the boostrap.php hook mentioned in the other thread, you'll
be sorted.

On Oct 2, 3:50 am, "Wayne Fay" <[EMAIL PROTECTED]> wrote:
> > @Wayne
> > good try, but that is perhaps one of the worst ideas I have seen in a
> > while
>
> I never claimed it was a Good Idea, nor suggested that I would choose
> that route myself... Only that it was a possible solution to his
> problem.
>
> Wayne


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to