Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Expose current_request()

#52

It would be useful to have a globally accesible function or variable that returns what the currently requested route is.

Example:

dispatch('/', 'home');
dispatch('blog', 'blog');

within configure() or before() or after() I cannot know if the request is going to be 'home' or 'blog'.

Reported by Gustavo Di Pietro · April 4th, 2011 @ 07:57 AM

State: invalid
Milestone: none
Assigned to: nobody

Activity

  1. xangelo (at gmail)
    xangelo (at gmail)

    This is already in place with request_uri

    using your example

    function before() {
        if(request_uri() == '/blog') {
    
        }
        else if(request_uri() == '/') {
    
        }
    }
    

    April 4th, 2011 @ 09:38 PM

  2. Fabrice Luraine
    Fabrice Luraine
    • State changed from new to invalid

    May 27th, 2011 @ 07:02 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.