// $Itemid = isset($Itemid) ? @$Itemid : null; $listid = isset($listid) ? @$listid : null; $id = isset($id) ? @$id : null; $view = isset($view) ? @$view : null; $formid = isset($formid) ? @$formid : null; $rowid = isset($rowid) ? @$rowid : null; // Get fabrik SEF configuration - used to include/exclude list's names in SEF urls $config = JComponentHelper::getParams('com_fabrik'); switch ($view) { case 'form': if (isset($formid) && $rowid != '') { $config->get('fabrik_sef_customtxt_edit') == '' ? $edit = 'edit' : ($edit = $config->get('fabrik_sef_customtxt_edit')); $title[] = shFetchFormName($formid) . '-' . $rowid . '-' . JText::_($edit); } else { $config->get('fabrik_sef_customtxt_new') == '' ? $new = 'new' : ($new = $config->get('fabrik_sef_customtxt_new')); $title[] = shFetchFormName($formid) . '-' . JText::_($new); } break; case 'details': // Insert menu name if set so in Fabrik's options if ($config->get('fabrik_sef_prepend_menu_title') == 1) { $app = JFactory::getApplication(); $menus = $app->getMenu(); $menusId = $menus->getMenu(); $itemId = $app->input->getInt('Itemid'); $title[] = $menusId[$itemId]->title; } // Insert table name if set so in Fabrik's options if ($config->get('fabrik_sef_tablename_on_forms') == 1) { if (isset($formid)) { $title[] = shFetchListName($formid);
// $Itemid = isset($Itemid) ? @$Itemid : null; $listId = isset($listId) ? @$listId : null; $id = isset($id) ? @$id : null; $view = isset($view) ? @$view : null; $formId = isset($formId) ? @$formId : null; $rowId = isset($rowId) ? @$rowId : null; // Get fabrik SEF configuration - used to include/exclude list's names in SEF urls $config = JComponentHelper::getParams('com_fabrik'); switch ($view) { case 'form': if (isset($formId) && $rowId != '') { $config->get('fabrik_sef_customtxt_edit') == '' ? $edit = 'edit' : ($edit = $config->get('fabrik_sef_customtxt_edit')); $title[] = shFetchFormName($formId) . '-' . $rowId . '-' . FText::_($edit); } else { $config->get('fabrik_sef_customtxt_new') == '' ? $new = 'new' : ($new = $config->get('fabrik_sef_customtxt_new')); $title[] = shFetchFormName($formId) . '-' . FText::_($new); } break; case 'details': // Insert menu name if set so in Fabrik's options if ($config->get('fabrik_sef_prepend_menu_title') == 1) { $app = JFactory::getApplication(); $menus = $app->getMenu(); $menusId = $menus->getMenu(); $itemId = $app->input->getInt('Itemid'); $title[] = $menusId[$itemId]->title; } // Insert table name if set so in Fabrik's options if ($config->get('fabrik_sef_tablename_on_forms') == 1) { if (isset($formId)) { $title[] = shFetchListName($formId);
$rowid = isset($rowid) ? @$rowid : null; /*--------------------------------------------- This part is only if you use some custom buttons appending "&my_table___my_element=value2" to your URL. In my exemple I have four categories (value1, value2, ...). ---------------------------------------------*/ //$my_table___my_element = isset($my_table___my_element) ? @$my_table___my_element : null; $shSampleName = shGetComponentPrefix($option); $shSampleName = empty($shSampleName) ? getMenuTitle($option, $task, $Itemid, null, $shLangName) : $shSampleName; $shSampleName = empty($shSampleName) || $shSampleName == '/' ? 'SampleCom' : $shSampleName; //Show the table's name if (isset($listid)) { $title[] = shFetchTableName($listid); } //Show the form's name if (isset($fabrik)) { $title[] = shFetchFormName($fabrik); shRemoveFromGETVarsList('listid'); } /* Fetch record's name. * Create an element called 'title_sef' in your table which should * return a string with no special characters or spaces or accents... One could use a * Fabrik Calc element which takes the value of another element on the table and replaces * all the unwanted characters with '_'. */ if (isset($rowid)) { $title[] = shFetchRowName($rowid, $listid); } //Again, this is for your custom links using "&my_table___my_element=value2" /*$sh_LANG['fr']['value1'] = 'valeur-un'; $sh_LANG['en']['value1'] = 'value-one'; $sh_LANG['fr']['value2'] = 'valeur-deux';