I am working on a client's website which is based on the Joomla 2.5 framework. With SEF turned off (the in built Joomla version) the URL is this
http://(domain)/index.php?option=com_cmgroupbuying&view=alldeals&Itemid=424
The user has a plugin, I have built into a plugin the line to make sure this plugin only fires when the component CMGroupbuying is in use
$component = JRequest::getCmd('option');
if($component =='com_cmgroupbuying')
{ etc etc }
With SEF turned off, this works beautifully. However when I enable SEF the URL turns into
http://(domain)/the-deals
and the detection script stops working as joomla just no longer sees the Request::getCmd('option'); being equal to com_cmgroupbuying which to be honest, blows me away as it renders getCmd totally useless. I have seen other prople suffer with this in the part but not found any definitive fix
Can anyone offer a solution to stop this failure of Joomla, either by some extra lines in the DEFAULT htaccess fault to retain this information for joomla to use, or maybe detecting part of the URL so I can build a detector script from that
JRequest::getVar('option');
? - Jobin