Summary:
Compatibility with News module (and possibly others)
Detailed Description:
Hello everybody,
Based on your experience, how do you use Babel with the News module ?
(The problem I have : the links generated by the News module are relative to the
root of the web site. And, the .htaccess / rewriting consider the first path -
/news/ - as a language)
(I think the problem may not be limited to the News module.)
One way I can think of is tweaking the Rewrite expression and conditions in
.htaccess.
The way I tried to solve it was with a patch to the news Module :
============
Index: 1.6.x/modules/News/action.default.php
===================================================================
--- 1.6.x/modules/News/action.default.php (revision 365)
+++ 1.6.x/modules/News/action.default.php (working copy)
@@ -346,6 +346,13 @@
{
$prettyurl .= '/d,' . $sendtodetail['detailtemplate'];
}
+
+ /* For BABEL multilingual site */
+ $page_lang_info = $smarty->get_template_vars('page_lang_info');
+ if( isset( $page_lang_info ) && !is_null( $page_lang_info ) ) {
+ $lang = $page_lang_info["langcode"];
+ $prettyurl = $lang . "/" . $prettyurl;
+ }
$sendtoprint = array('articleid' => $row['news_id'], 'showtemplate' =>
'false');
============
This patch should work with or without pretty urls, but was only tested with
pretty urls.
Also, it should work on non-babel installs also, but I didn't try neither.
Please give me some feedback on this and how you use babel / news.