SEF Itemid

More
12 years 5 months ago #20193 by ggppdk
Replied by ggppdk on topic SEF Itemid
Yes, this is what i suggested but you did without parameter. So now your solution is hardcoded inside the PHP files for all categories.
(Now all categories are forced the same menu item id for their items)

What i suggested by the parameter is to all to have different forced menu item id per category and also by leaving the parameter blank we make it optional too.

Anyway your proposition makes sense and i will add this parameter to both category and module.

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 3 months ago #21642 by Hyperion
Replied by Hyperion on topic SEF Itemid
Hi,

There's another way, if I may.

Sometimes mod_flexicontent (in homepage) does not place the right Itemid in the url. I have of to force this regulation by inspiring me of the code of ggppdk.

At first by modifying the file modules/mod_flexicontent/mod_flexicontent.xml
Code:
<param name="force_curr_itemid" type="radio" default="0" label="FLEXI_FORCE_CURR_MENU_ITEMID" description="FLEXI_FORCE_CURR_MENU_ITEMID_DESC"> <option value="0">FLEXI_NO</option> <option value="1">FLEXI_YES</option> </param> <param name="forced_itemid" type="text" default="" size="3" label="FLEXI_FORCED_ITEMID" description="FLEXI_FORCED_ITEMID_DESC" />
Two parameters: the one asking if we need to force Itemid and the other one, in case of positive answer, which Itemid must be forced.

Then the file modules/mod_flexicontent/helper.php
Code:
// Forced ItemID $force_curr_itemid = (int)$params->get('force_curr_itemid', 0); $forced_itemid = (int)$params->get('forced_itemid'); $final_itemid = ($force_curr_itemid) ? $forced_itemid : 0;
And
Code:
$lists[$ord]['featured'][$i]->link = JRoute::_(FlexicontentHelperRoute::getItemRoute($row->slug, $row->categoryslug, $final_itemid));
Code:
$lists[$ord]['standard'][$i]->link = JRoute::_(FlexicontentHelperRoute::getItemRoute($row->slug, $row->categoryslug, $final_itemid));

In this way I am not dependent any more on the active itemid... the module can be placed somewhere and a pointer towards the other one with no problem at all... while keeping the regulations of the itemid of destination.

Regards

Please Log in or Create an account to join the conversation.

More
12 years 3 months ago #21643 by ggppdk
Replied by ggppdk on topic SEF Itemid
yes i was thinking to re-enabling the parameter to force a specific menu item id for the module, if you do not force a specific then the FLEXIcontent routing will select the "closest" match.

I have opened an issue not to forget:
Options will be:
a. force specific
b. use current if pointing to FLEXIcontent
c. auto select best match

code.google.com/p/flexicontent/i ... ail?id=329

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.267 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline