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 231157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:54:35+00:00 2026-05-11T19:54:35+00:00

I had created my own little lightweight framework for small projects, and now switched

  • 0

I had created my own little lightweight framework for small projects, and now switched to Kohana.

But I wonder what’s the way to go to achieve navigation hierarchies.

Example: I have a menu like this:

Home | Products | Support | Contact

In my old framework, when the user clicked on “Products”, my framework knew which navigation layer this is and then my view attached an “_active” suffix to the css class of that menu item, so it’s highlighted. The same for all parent navigation elements.

How are you setting up your site in Kohana to achieve something like this?

I thought about making one big layout view that contains the menu bar. There, I would have to implement all the logic to figure out which menu item has to be highlighted as active. Is there any clever mechanism for this, or would I just have to figure out from the current url somehow in a bunch of if-statements, if an url segment matches the menu item?

  • 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-11T19:54:35+00:00Added an answer on May 11, 2026 at 7:54 pm

    You can use the uri::segment() method to get the current page, and then determine what your suffix should be based on that.

    Example:

    # Example Url: http://www.example.com/index.php/article/paris/hilton/
    echo $this->uri->segment(3); // Returns 'hilton'
    

    From there it’s just a matter of checking the returned value against each one of your navigation links – when it maches, add your suffix.

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

Sidebar

Related Questions

I had created a Lib Project with a class inherits ServiceBase but when I
I had created a custom search engine on Google but the problem is that
I had originally created a windows form to be a dialog of my projects
I needed a dynamic context menu for my jstree so created my own but
For this assignment I had to create my own string class. I initially wrote
I recently had an idea to create my own String class to make using
I had created one div window which is draggable,and created one child div (with
I had created the following view, SELECT currency_cd, SUM(comprate) AS salary, employee_code, (SELECT SUM(c.comprate)
I had created one HTML page for my experiance. In this i had use
I had created a zip file (together with directory) under Windows as follow (Code

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.