Joomla.it Forum

Joomla! 2.5 (versione con supporto terminato) => Joomla! 1.6/1.7/2.5 => I Template di Joomla 1.6/1.7/2.5 => : Ste_Goldberg 21 Jul 2012, 16:08:05

: Levare dei passaggi nel breadcrumbs
: Ste_Goldberg 21 Jul 2012, 16:08:05
Salve, devo cacciare dei passaggi che con la modalità seo attiva escono, mentre se la caccio, non appaiono. Ora è così : Home ° VirtueMart ° Default layout ° Accessori nautica generale ° Ecoscandaglio garmin echo 300C, io vorrei cacciare la scritta virtuemart"Virtuemart" e "default layout". Sono andato nel modulo del breadscrumbs, ma non capisco come fare.


Questi sono i codici, mod_breadscrums.php:
:
<?php
/**
 * @package      Joomla.Site
 * @subpackage   mod_breadcrumbs
 * @copyright   Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license      GNU General Public License version 2 or later; see LICENSE.txt
 */


// no direct access
defined('_JEXEC') or die;


// Include the syndicate functions only once
require_once dirname(__FILE__).'/helper.php';


// Get the breadcrumbs
$list   modBreadCrumbsHelper::getList($params);
$count   count($list);


// Set the default separator
$separator modBreadCrumbsHelper::setSeparator($params->get('separator'));
$moduleclass_sfx htmlspecialchars($params->get('moduleclass_sfx'));


require 
JModuleHelper::getLayoutPath('mod_breadcrumbs'$params->get('layout''default')); 





Poi questo:helper.php



:
<?php
/**
 * @package      Joomla.Site
 * @subpackage   mod_breadcrumbs
 * @copyright   Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license      GNU General Public License version 2 or later; see LICENSE.txt
 */


// no direct access
defined('_JEXEC') or die;


class 
modBreadCrumbsHelper
{
   public static function 
getList(&$params)
   {
      
// Get the PathWay object from the application
      
$app      JFactory::getApplication();
      
$pathway   $app->getPathway();
      
$items      $pathway->getPathWay();


      
$count count($items);
      for (
$i 0$i $count$i ++)
      {
         
$items[$i]->name stripslashes(htmlspecialchars($items[$i]->nameENT_COMPAT'UTF-8'));
         
$items[$i]->link JRoute::_($items[$i]->link);
      }


      if (
$params->get('showHome'1))
      {
         
$item = new stdClass();
         
$item->name htmlspecialchars($params->get('homeText'JText::_('MOD_BREADCRUMBS_HOME')));
         
$item->link JRoute::_('index.php?Itemid='.$app->getMenu()->getDefault()->id);
         
array_unshift($items$item);
      }


      return 
$items;
   }


   
/**
    * Set the breadcrumbs separator for the breadcrumbs display.
    *
    * @param   string   $custom   Custom xhtml complient string to separate the
    * items of the breadcrumbs
    * @return   string   Separator string
    * @since   1.5
    */
   
public static function setSeparator($custom null)
   {
      
$lang JFactory::getLanguage();


      
// If a custom separator has not been provided we try to load a template
      // specific one first, and if that is not present we load the default separator
      
if ($custom == null) {
         if (
$lang->isRTL()){
            
$_separator JHtml::_('image''system/arrow_rtl.png'NULLNULLtrue);
         }
         else{
            
$_separator JHtml::_('image''system/arrow.png'NULLNULLtrue);
         }
      } else {
         
$_separator htmlspecialchars($custom);
      }


      return 
$_separator;
   }
}

: Re:Levare dei passaggi nel breadcrumbs
: giusebos 21 Jul 2012, 19:36:25
 :)
per cortesia Ste_goldberg, il codice fra i tag code.
: Re:Levare dei passaggi nel breadcrumbs
: giovi 21 Jul 2012, 19:39:40
Perdona l'ignoranza.. "Cacciare" è il termine specifico tecnico.. per cosa??
: Re:Levare dei passaggi nel breadcrumbs
: giusebos 21 Jul 2012, 19:51:41
cacciare viene spesso usato in campania, sta per "eliminare" "sostituire" "cambiare" "tirare fuori"
: Re:Levare dei passaggi nel breadcrumbs
: giovi 21 Jul 2012, 19:56:18
Il modulo breadcrumb prende gli indirizzi da come li salva joomla nel db/in cache (su questo non sono ferrato) quindi una modifica del codice servirebbe a poco, a meno che tu non voglia filtrare la parola virtuemart affinchè venga sostituita da un carattere nullo. In questo caso puoi appronfodire lo string replace o il preg replace (http://www.php.net/manual/en/function.preg-replace.php).

Per modificare il percorso vero e proprio credo che tu debba agire creando della apposite voci di menu
: Re:Levare dei passaggi nel breadcrumbs
: Ste_Goldberg 22 Jul 2012, 14:36:04
Per cacciare intendevo di non farlo vedere solo nel breadcrumb, ho notato che lo stesso passaggio poi si forma anche nell'url "virtuemart/default-layout/accessori-nautica/ecoscandaglio-garmin300c-detail.html"
: Re:Levare dei passaggi nel breadcrumbs
: giovi 22 Jul 2012, 15:04:47
per farlo sparire anche da li prova a creare una voce di menu (in un menu nascosto) che linki direttamente a quella pagina/sezione del sito.