For the second solution add 2 options to the Global parameters of Flexicontent.
These options are for:
1. Default menu itemid for Items that do not have a menu item pointing to them, and also have no menu item pointing to any parent category of the item.
This is needed for SEF URLs and for displaying the title of the menu item in the breadcrubs.
In menu item options
-- Set it to point to any flexicontent item,
-- Set title to 'Site Article' or something like that
-- Set 'item depth' option to 1 to avoid making it clickable
2. Default menu itemid for categories that do not have a menu item pointing to them.
This is needed for SEF URLs and for displaying the title of the menu item in the breadcrubs.
In menu item options
-- Set it to point to any flexicontent category
-- Set title to 'Site Content' or something like that
-- Set 'item depth' option to 1 to avoid making it clickable
In file administrator/components/com_flexicontent/config.xml
Just after line: <param name="show_updatecheck" ...
ADD
Code:
<param name="default_items_itemid" type="text" size="6" default="" label="Items: Default Menu Item" description="Default menu itemid for Items that do not have a menu item pointing to them, and also have no menu item pointing to any parent category of the item.<br><br> This is needed for SEF URLs and for displaying the title of the menu item in the breadcrubs.<br><br> <u>In menu item options</u>:<br> -- Set it to point to any flexicontent item, <br> -- Set title to 'Site Article' or something like that<br> -- Set 'item depth' option to 1 to avoid making it clickable" menu="hide" />
<param name="default_categories_itemid" type="text" size="6" default="" label="Cat/s: Default Menu Item" description="Default menu itemid for categories that do not have a menu item pointing to them.<br><br> This is needed for SEF URLs and for displaying the title of the menu item in the breadcrubs.<br><br> <u>In menu item options</u>:<br> -- Set it to point to a any flexicontent category<br> -- Set title to 'Site Content' or something like that<br> -- Set 'item depth' option to 1 to avoid making it clickable" menu="hide" />
In file: components/com_flexicontent/helpers/route.php
in function getCategoryRoute(...)
just before the
ADD:
Code:
else {
$params = JComponentHelper::getParams( 'com_flexicontent' );
$link .= '&Itemid='.$params->get('default_categories_itemid');
}
in function _findItem(...)
just before the
ADD:
Code:
if ($match==null) {
$params = JComponentHelper::getParams( 'com_flexicontent' );
$defitem = new stdClass();
if ( $defitem->id = $params->get('default_items_itemid','') ) {
$match = $defitem;
}
}
Also in this file, in function _findItem(...) i recommended commenting out the lines:
} else if ( @$globalitems && @$item->query ...
$match = $item; // priority 3 advanced ...
because they will make an article/item appear under the menu item of another article/item that is in the same category.
I think this is really unwanted behavior.
I will submit fix in the bug tracker.
NOTE that the default itemid option for Items is not needed since it does not produce an error.
but i think we should comment out the 2 above lines.
UPDATE 10/7/2011:
corrected the above code as it gave an error in the backend (in category Management).
Regards