User tests: Successful: Unsuccessful:
.
Labels |
Added:
?
|
Hello,
the only reason is, that the default language is always a star (*). So I thought, it's a good idea to set the star as default parameter. An example:
$id = 102; // any valid menu ID
$menu = JFactory::getApplication()->getMenu();
$menu->setDefault($id);
$default = $menu->getDefault();
print_r($default);
I think, this two methods should be compatible. (Test the code before and after the patch)
Category | ⇒ | Multilanguage |
I can't imagine how setting the default home page item gets set outside of menu manager. But indeed it seems correct to use the same standardisation here as we have for the default value in com_menu's itself
There are several reasons to set the default home page. For example, I had to write a plugin that made a menu item the default page when the user first opened the page via some landing page. Remember that this is not set permanently, but only sets the default page in JMenu for the duration of the pageload.
Yep, I wrote a multi domain plugin (that's the reason why I found this "issue") where I set the default page depending on the domain.
Status | Pending | ⇒ | Ready to Commit |
moving to RTC since we have successdful tests by @Hackwar and @jacxx Thanks.
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-01-06 01:02:03 |
Merged - thanks!
Milestone |
Added: |
Please explain the reason behind this change as well as testing instructions.