initial pages 0-Z: how to change the default pathes?
mueller-marc - August 26, 2009 - 14:45
| Project: | G2 Glossary |
| Version: | 6.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
How can I configure G2 Glossary in Drupal to get the following results?
The entries page, e.g. initial A, should be available under URL "http://www.mydomain.org/glossary/A" instead of the default URL "http://www.mydomain.org/g2/initial/A". Same to all other entries pages (initial 0-Z).
Many thanks in advance,
Oliver

#1
G2 does not include a mechanism to override its paths, except for its "main" page, which you can set at admin/settings/g2, in the "G2 glossary main page" field. This is by design and not expected to change.
You can enable the inbound paths you want by rewriting them in your .htaccess, but it won't remove the paths output by G2, which will still be the same g2/initial/(initial) ; or you can rewrite them using hook_menu_alter in a third-party module, which is probably the better solution.
Similarly, altering outgoing links (those generated by G2) could be created in a third-party module by implementing custom_url_rewrite_outbound, but you have to beware, as this function is costly; see its API page to understand why.
#2
One last suggestion: don't forget aliases can also be used for this: they are not only for nodes but for any path, so if you define an alias to the main G2 paths, like the by-initial pages, there won't be a lot left for menu_alter.
Assuming fixed, since there was no answer since august.
#3
Automatically closed -- issue fixed for 2 weeks with no activity.