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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:01:04+00:00 2026-05-22T00:01:04+00:00

Alright so I have a plugin for Redmine (Rails Engines.) The plugin uses the

  • 0

Alright so I have a plugin for Redmine (Rails Engines.) The plugin uses the hooks such that it’s HTML/controls get rendered on every page in Redmine.

I am receiving and sending information from this plugin to the controller. Now I have two options I can use in the javascript and css: relative pathing or absolute pathing.

Relative Pathing won’t work for every page since the URL paths may anywhere from one to three sections to path from (Since the control must work from every page). This option requires my plugin to be rendered at the same nested level in the URL every time which it is not.

Absolute Pathing works for a particular install, but my plugin breaks when others use it under installs where the path is not under the domain root i.e. http://www.mysite.com/redmine/ instead of http://www.mysite.com. This requires manual editing which is not elegant at all.

Is there any way to easily address this seemingly simple issue?

  • 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-22T00:01:05+00:00Added an answer on May 22, 2026 at 12:01 am

    If it’s a CSS, JS, or image file you can use the tag helpers with the :plugin option (Rails engines patches these)

    stylesheet_link_tag 'redmine_kanban.css', :plugin => 'redmine_kanban'
    javascript_include_tag 'jquery-1.3.2.min.js', :plugin => 'redmine_kanban'
    image_tag 'example.png', :plugin => 'redmine_kanban'
    

    Make sure that the plugin name matches it’s install directory (e.g. vendor/plugins/redmine_kanban in the example above).

    To reference assets like images in your css, you can use an external css file and url(../images/example.png. Rails Engines will copy the assets/ directory to public/plugin_assets/plugin_name/[images|javascripts|stylesheets] so you just need go down a directory to get to images.

    JavaScript is a bit more difficult. The best way would be to export a JavaScript variable of the current relative path. I do something like this to export the language translation strings to JSON to use in my JavaScript.

    javascript_tag("var redmineRootPath = #{Redmine::Utils.relative_url_root}")
    

    Hope this helps.

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

Sidebar

Related Questions

Alright, currently I have my SWF hitting a php file that will go and
Alright. I have a query that looks like this: SELECT SUM(`order_items`.`quantity`) as `count`, `menu_items`.`name`
Alright, so I have a query that looks like this: SELECT `orders`.*, GROUP_CONCAT( CONCAT(
Is it alright to expect that the user using the back end will have
Alright, I have a wordpress site, that I want to have a clientportal built
Alright I have an xml document that looks something like this: <xml> <list> <partner>
For example I have this gem called Authlogic-openid, that plugin is outdated, no longer
Alright, I have library I wrote in C that reads a file and provides
Alright. The idea is that I have a jCarousel list that displays 3 items
Alright I have a table where I need to get the relevant date from

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.