-
-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URL-Path to / when mounted on /pages #1918
Comments
Hey. Thanks for reporting this issue and welcome to AlchemyCMS. The maintainer have been notified. Please be patient while waiting for an answer. Open Source is done by volunteers, so give them some time to react. Meanwhile please think about sending a PR that fixes this issue. It is way more likely that it will be accepted than this bug fixed for you. Remember OpenSource is done by all of us. Again, thanks for reporting. |
Looking for guidance on this and all alchemy related topic I get to https://gitter.im/AlchemyCMS - can someone tell me if this is the right place to ask for help. |
Please join us on Slack as noted in the README and the homepage. |
Ideally Alchemy would have build in support for this, The easiest fix for your problem would be to add your own class MyOwn::UrlPath < Alchemy::Page::UrlPath
def call
"/pages" + super
end
end # app/models/alchemy/page_decorator.rb
module Alchemy
module PageDecorator
def url_path
MyOwn::UrlPath.new(self).call
end
Page.prepend(self)
end
end Will provide a PR that make setting a custom UrlPath class easier, but for now the decorator should do the trick in a Solidus environment. |
If an app mounts Alchemy at a non-root path we need to return that as prefix. Closes AlchemyCMS#1918
If an app mounts Alchemy at a non-root path we need to return that as prefix. Closes #1918
It turned out that it was pretty east to add support for custom mount points in the url path class. Latest # Gemfile
gem "alchemy_cms", github: "https://github.com/AlchemyCMS/alchemy_cms", branch: "master" |
Steps to reproduce
My alchemy is mounted on /pages:
mount Alchemy::Engine => 'pages'
But url path of pages are pointing to
\
instead of\pages
causing linkeable elements to point to the wrong place.Expected behavior
linkeable elements should point to /
System configuration
The text was updated successfully, but these errors were encountered: