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

  • Home
  • SEARCH
  • 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 1109425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:13:59+00:00 2026-05-17T02:13:59+00:00

Kohana (and probably other frameworks) allow you get a route and echo its URL,

  • 0

Kohana (and probably other frameworks) allow you get a route and echo its URL, creating routes that are easy to maintain.

<a href="<?php echo url::base() . Route::get('contact'); ?>">Contact</a>

Is this OK to have in the view, or should I assign it to a variable, and then pass the view the variable?

Thanks

  • 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-17T02:13:59+00:00Added an answer on May 17, 2026 at 2:13 am

    You aren’t performing logic here. This is perfectly acceptable.

    Of course your view code would be a bit cleaner if you created a variable in your controller, but this really is fine IMHO.

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

Sidebar

Related Questions

In Kohana 2 you could easily get that information like this: echo router::$controller; echo
In other php frameworks (kohana, zend, fuel) its possible to auto load files based
I'm creating a Kohana module, and creating a route dynamically within that module. I'd
Reading Kohana's documentation, I found out that the main difference in 3.0 version is
In Kohana 2 you can override the default error page by creating a custom
this is probably trivial, but i have a quite long sql query and echo
Quick question, does Kohana (version 3) automatically escape data that is passed into ORM::factory.....
I need to setup a Kohana dev environment that allows me to make full
In Kohana 3.2 how do you set up a route to accept multiple directories
I have a Kohana 3.0.14 website that i want to put on multiple domains,

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.