Example #1
0
             $title[] = '';
             break;
         case 'id_only':
             $title[] = $rowId;
             shRemoveFromGETVarsList('rowid');
             break;
         case 'id_slug':
             $title[] = $rowId . '-' . shFetchSlug($rowId, $formId);
             shRemoveFromGETVarsList('rowid');
             break;
         case 'slug_id':
             $title[] = shFetchSlug($rowId, $formId) . '-' . $rowId;
             shRemoveFromGETVarsList('rowid');
             break;
         case 'slug_only':
             $title[] = shFetchSlug($rowId, $formId);
             shRemoveFromGETVarsList('rowid');
             break;
     }
     shMustCreatePageId('set', true);
 } else {
     // Case of link to details from menu item
     // First get the Itemid from the menu link URL
     $pos = strpos($string, 'Itemid=');
     $itemId = substr($string, $pos + 7);
     $pos = strpos($itemId, '&');
     $itemId = substr($itemId, 0, $pos);
     $app = JFactory::getApplication();
     $menus = $app->getMenu();
     $menusId = $menus->getMenu();
     // Get the rowid and formid from the menu object
Example #2
0
// var_dump( $rowid );
// Get fabrik SEF configuration - used to include/exclude list's names in SEF urls
$config = JComponentHelper::getParams('com_fabrik');
switch ($view) {
    case 'form':
        return false;
        break;
    case 'details':
        // 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);
            }
        }
        if (isset($rowid)) {
            $title[] = shFetchSlug($rowid, $formid);
            shRemoveFromGETVarsList('rowid');
            shMustCreatePageId('set', true);
        } else {
            // Case of link to details from menu item
            // First get the Itemid from the menu link URL
            $pos = strpos($string, 'Itemid=');
            $itemId = substr($string, $pos + 7);
            $pos = strpos($itemId, '&');
            $itemId = substr($itemId, 0, $pos);
            $menus = JSite::getMenu();
            $menusId = $menus->getMenu();
            // Get the rowid and formid from the menu object
            $menu_params = new JParameter($menusId[$itemId]->params);
            $rowid = $menu_params->get('rowid');
            $formid = $menusId[$itemId]->query['formid'];