Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
there's no work around at the moment. You could modify the code and change 'faq' to the path of your choice on lines 74, 125, 132 and 133 in faq.module. I'm not inclined to make this a feature at the moment, unless more people request it.
If you go to admin and set a path alias for 'faq' to say 'my-path/faq' it only works for URL 'faq'. All teh FAQs themselves still appear as faq/number with my path missing.
Now maybe if the URL alias module allowed you to set anything under the url you remap it would be a better option
ie faq becomes my-path/faq/number... but thats another story
I think if i understand correctly, your setting Alias for every FAQ item?
Which is slightly different in that i want a global 'my-path' across all faq's meaning i would not have to manually set a path alias on potentially several hundred nodes
No, I only set the aliases for each page of faq's (I have 5). For those with lots of such pages, I am sure that pathauto could be set up to do what you want.
Now, I will note that when I hover over an faq link, it still shows /faq/xxx, but when you go to the page, the address bar shows the desired alias. I don't know if this has an impact on search engines.
midkemia: I think the only way to get what you want is for you to lodge a feature request again the path module so it can handle wildcards. Maybe the pathauto module can do this, not sure. Wildcards could work for the per-category faq pages, but I don't think it would be possible for the faq nodes themselves, if this is what you wanted. It still falls outside the scope of the faq module.
In fact the original request can be handled by the path module using URL aliases, so there is no reason for it to be done in the faq module at all. Hence changing this to be "by design".
I have pathauto setup so that faqs get mapped to /content/faqs/[title]l and thats what appears in the address bar. It also appears on the faq page (which is /content/faq) in the title link to the individual faqs, it just doesnt show up in the summary links at the top of the categories. No biggie to me.
Comments
Comment #1
stella commentedthere's no work around at the moment. You could modify the code and change 'faq' to the path of your choice on lines 74, 125, 132 and 133 in faq.module. I'm not inclined to make this a feature at the moment, unless more people request it.
Cheers,
Stella
Comment #2
Anonymous (not verified) commentedYou can add me to the wish list of those interested in this. the FAQ is the only item on my website that doesnt comply with the URL format i use
Comment #3
nancydruWould it be possible to use "Locale" for this? Create a dummy language and translate that string to whatever they want.
Comment #4
stella commentedmidkemia: what is the URL format you use out of interest?
Comment #5
Anonymous (not verified) commentedI am using the core path module
What i have done for all major nodes is used
www.mydomain.com/my-path/my-page
with the faq module i effectively get
www.mydomain.com/my-page
with my-page being FAQ
I had 5.x 2.3 installed and tried the suggested line changes but it didnt make a difference, I now have 2.4 but not tried the changes as yet
Comment #6
nancydruHmm, I just added a URL alias for "/faq" to "/questions/faq" and it came out that way.
Comment #7
Anonymous (not verified) commentedIf you go to admin and set a path alias for 'faq' to say 'my-path/faq' it only works for URL 'faq'. All teh FAQs themselves still appear as faq/number with my path missing.
Now maybe if the URL alias module allowed you to set anything under the url you remap it would be a better option
ie faq becomes my-path/faq/number... but thats another story
Comment #8
nancydruI also have URL aliases on all my /faq/# pages - and have had since 2.0 came out.
Comment #9
Anonymous (not verified) commentedCan you describe how you configured the alias as i must have missed something.
By default i get
www.mydomain.com/faq/#
when i set an alias for 'faq' to
my-path/faq
i get
www.mydomain.com/my-path/faq
but for the faq submenu's i still get
www.mydomain.com/faq/#
when i am looking for
www.mydomain.com/my-path/faq/#
Comment #10
nancydruPretty simple, I set "/faq/28" to "/questions/about_us.html" and "faq/29" to "/questions/general_info.html".
Comment #11
Anonymous (not verified) commentedI think if i understand correctly, your setting Alias for every FAQ item?
Which is slightly different in that i want a global 'my-path' across all faq's meaning i would not have to manually set a path alias on potentially several hundred nodes
Comment #12
nancydruNo, I only set the aliases for each page of faq's (I have 5). For those with lots of such pages, I am sure that pathauto could be set up to do what you want.
Now, I will note that when I hover over an faq link, it still shows /faq/xxx, but when you go to the page, the address bar shows the desired alias. I don't know if this has an impact on search engines.
Comment #13
stella commentedmidkemia: I think the only way to get what you want is for you to lodge a feature request again the path module so it can handle wildcards. Maybe the pathauto module can do this, not sure. Wildcards could work for the per-category faq pages, but I don't think it would be possible for the faq nodes themselves, if this is what you wanted. It still falls outside the scope of the faq module.
In fact the original request can be handled by the path module using URL aliases, so there is no reason for it to be done in the faq module at all. Hence changing this to be "by design".
Cheers,
Stella
Comment #14
WorldFallz commentedI have pathauto setup so that faqs get mapped to /content/faqs/[title]l and thats what appears in the address bar. It also appears on the faq page (which is /content/faq) in the title link to the individual faqs, it just doesnt show up in the summary links at the top of the categories. No biggie to me.
Comment #15
stella commentedWorldFallz: what do you mean by "the summary links at the top of the categories" exactly? Which layout (both categories and questions) are you using?
Cheers,
Stella
Comment #16
stella commentedresetting page title back to original
Comment #17
mjrider commentedI would like to be added to the list of people who request custom url option as well
Comment #18
adrnand commentedI would like to be added to the list of people who request custom url option as well
Comment #19
stella commentedThis can still be handled using Drupal core's path module and the contrib pathauto module.