Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7663179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:59:35+00:00 2026-05-31T13:59:35+00:00

Just started with the framework Kohana and I’m understanding it better with the minute.

  • 0

Just started with the framework Kohana and I’m understanding it better with the minute.
Now i’m trying to make the menu dynamic to the page the visitor is currently on.
So if the menu is – for example – like:

  1. Item1
  2. Item2
  3. Item3

and the user visits page example.com/kohana/item2 the menu should be like:

  1. Item1
  2. Item2
  3. Item3

So I have to check the URI and compare that with the menu items. I already tried it in different ways but all of them gave me errors.

For your information views/menu.php is now like:

<ul id="menu">
        <li class="first"><?php echo HTML::anchor("", "item1"); ?></li>
        <li><?php echo HTML::anchor("item2", "item2"); ?></li>
        <li><?php echo HTML::anchor("item3", "item3"); ?></li>
        <li><?php echo HTML::anchor("item4", "item4"); ?></li>
        <li><?php echo HTML::anchor("item5", "item5"); ?></li>
        <li><?php echo HTML::anchor("item6", "item6"); ?></li>

    </ul><br/><br/>

I’m working with Kohana 3.2

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T13:59:36+00:00Added an answer on May 31, 2026 at 1:59 pm

    Grab the ‘id’ parameter from the route ($this->request->param('id') for instance) and compare it to your nav lists. You may also have to look at $this->request->controller() and $this->request->method(), those are very useful methods.

    P.S. All methods I’ve mentioned should be used in your controllers. Simply you could set some array called “nav” in your template controller and bind it to the template,and then through foreach iterate the menu items and compare item’s uri.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started to using the Kohana framework and I'm trying to execute a
I just started with the version 3 of the Kohana Framework. I have worked
I just started to use the PHP symfony framework. Currently I'm trying to create
I just have started using vecLib framework to make a program doing intensive matrix-vector
I just started playing around with the 960 CSS framework and found that it
I have just started migrating my homegrown persistence framework to JPA. Given that the
I have just started writing my own JavaScript Framework (just for the learning experience),
I have just started playing with the ASP.Net MVC framework, and today I created
I have just started out with testing some php mvc framework In it, it
I am just getting started with Microsoft's Entity Framework, using it for an MVC

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.