Menu Help

  • Posts: 33
  • Thank you received: 2
13 years 6 months ago #15873

Ok, I finally figured out the process of creating a menu via the Categories.

I'm working on their style now. Apparently the sliders are built into the system for categories so maybe someone could help me fix this.

I want the main category item to just open the submenu. As it is in the system now, it does open the submenu but it also opens all of the categories in the content area.

Any thoughts on how I might fix this or am stuck with it.

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
13 years 6 months ago #15876

You will have to go in the menu Display->Views and edit the file listing_list of the view category and change the line:
$link = hikashop::completeLink('category&task=listing&cid='.$row->category_id.'&name='.$row->alias.$this->menu_id);

to:
$link = '#';

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

  • Posts: 33
  • Thank you received: 2
13 years 6 months ago #15879

Hmm, I only found two instances of this in that file...I made the change and it still opens the link.

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
13 years 6 months ago #15880

Are you sure you edited the correct view ? If you have several templates on your website you need to edit the file of your main template.

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

  • Posts: 33
  • Thank you received: 2
13 years 6 months ago #15881

Yeah, I updated the one for my Site template. Also made sure it was category view that I was editing.

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

  • Posts: 33
  • Thank you received: 2
13 years 6 months ago #15882

Do I need to change all the instances or just one?

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

  • Posts: 33
  • Thank you received: 2
13 years 6 months ago #15884

Here is the code from the listing_list under Category of my default website template.

<?php
/**
* @package HikaShop for Joomla!
* @version 1.4.8
* @author hikashop.com
* @copyright (C) 2010 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<?php if($this->config->get('pagination')=='top' && $this->params->get('show_limit') && $this->pageInfo->elements->total > $this->params->get('limit')){ ?>
<form action="<?php echo hikashop::completeLink(JRequest::getWord('ctrl').'&task='.JRequest::getWord('task').'&cid='.$this->pageInfo->filter->cid);?>" method="post" name="adminForm_<?php echo $this->params->get('main_div_name').$this->category_selected;?>">
<div class="hikashop_subcategories_pagination">
<?php echo $this->pagination->getListFooter(); ?>
<span class="hikashop_results_counter"><?php echo $this->pagination->getResultsCounter(); ?></span>
</div>
<input type="hidden" name="filter_order_<?php echo $this->params->get('main_div_name').$this->category_selected;?>" value="<?php echo $this->pageInfo->filter->order->value; ?>" />
<input type="hidden" name="filter_order_Dir_<?php echo $this->params->get('main_div_name').$this->category_selected;?>" value="<?php echo $this->pageInfo->filter->order->dir; ?>" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
<?php } ?>
<div class="hikashop_subcategories">
<?php
switch($this->params->get('child_display_type')){
case 'nochild':
default:
?>
<ul class="hikashop_category_list<?php echo $this->params->get('ul_class_name'); ?>">
<?php
$width = (int)(100/$this->params->get('columns'));
if(!empty($this->rows)){
foreach($this->rows as $row){
/* $link = hikashop::completeLink('category&task=listing&cid='.$row->category_id.'&name='.$row->alias.$this->menu_id); */
$link = '#';
?>
<li class="hikashop_category_list_item" style="float:left;width:<?php echo $width;?>%;">
<a href="<?php echo $link; ?>">
<?php echo $row->category_name; ?>
</a>
</li>
<?php
}
}
?>
</ul>
<?php
break;
case 'allchildsexpand':
?>
<div id="category_panel_<?php echo $this->params->get('id');?>" class="pane-sliders">
<?php
if(!empty($this->rows)){
foreach($this->rows as $k => $row){
$link = hikashop::completeLink('category&task=listing&cid='.$row->category_id.'&name='.$row->alias.$this->menu_id);
?>
<div class="panel">
<h3 class="jpane-toggler title" id="category_pane_<?php echo $k;?>" style="cursor:default;">
<span>
<a href="<?php echo $link;?>"><?php echo $row->category_name;?></a>
</span>
</h3>
<div class="jpane-slider content">
<ul class="hikashop_category_list<?php echo $this->params->get('ul_class_name'); ?>"><?php
if(!empty($row->childs)){
foreach($row->childs as $child){
$link = hikashop::completeLink('category&task=listing&cid='.$child->category_id.'&name='.$child->alias.$this->menu_id);
?>
<li class="hikashop_category_list_item">
<a href="<?php echo $link; ?>">
<?php echo $child->category_name; ?>
</a>
</li>
<?php
}
}
?></ul>
</div>
</div><?php
}
}
?></div><?php
break;
case 'allchilds':
jimport('joomla.html.pane');
$found = 0;
if(JRequest::getString('option',HIKASHOP_COMPONENT) && JRequest::getString('ctrl','category') && $cid = JRequest::getInt('cid',0)){
$i=0;
foreach($this->rows as $k => $row){
if($row->category_id==$cid){
$found = $i;
break;
}
$i++;
}
}
$this->tabs =& JPane::getInstance('sliders', array('startOffset'=>$found,'startTransition'=>0));
echo $this->tabs->startPane( 'category_panel_'.$this->params->get('id'));
if(!empty($this->rows)){
foreach($this->rows as $k => $row){
$link = hikashop::completeLink('category&task=listing&cid='.$row->category_id.'&name='.$row->alias.$this->menu_id);
echo $this->tabs->startPanel('<a href="'.$link.'">'.$row->category_name.'</a>', 'category_pane_'.$k);
?><ul class="hikashop_category_list<?php echo $this->params->get('ul_class_name'); ?>"><?php
if(!empty($row->childs)){
foreach($row->childs as $child){
$link = hikashop::completeLink('category&task=listing&cid='.$child->category_id.'&name='.$child->alias.$this->menu_id);
?>
<li class="hikashop_category_list_item">
<a href="<?php echo $link; ?>">
<?php echo $child->category_name; ?>
</a>
</li>
<?php
}
}
?></ul><?php
echo $this->tabs->endPanel();
}
}
echo $this->tabs->endPane();
break;
}
?>
</div>
<?php if($this->config->get('pagination')=='bottom' && $this->params->get('show_limit') && $this->pageInfo->elements->total > $this->params->get('limit')){ ?>
<form action="<?php echo hikashop::completeLink(JRequest::getWord('ctrl').'&task='.JRequest::getWord('task').'&cid='.$this->pageInfo->filter->cid);?>" method="post" name="adminForm_<?php echo $this->params->get('main_div_name').$this->category_selected;?>">
<div class="hikashop_subcategories_pagination">
<?php echo $this->pagination->getListFooter(); ?>
<span class="hikashop_results_counter"><?php echo $this->pagination->getResultsCounter(); ?></span>
</div>
<input type="hidden" name="filter_order_<?php echo $this->params->get('main_div_name').$this->category_selected;?>" value="<?php echo $this->pageInfo->filter->order->value; ?>" />
<input type="hidden" name="filter_order_Dir_<?php echo $this->params->get('main_div_name').$this->category_selected;?>" value="<?php echo $this->pageInfo->filter->order->dir; ?>" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
<?php } ?>

Last edit: 13 years 6 months ago by dniezby.

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
13 years 6 months ago #15887

You need to replace the line everywhere in the file.

I see that you still have it there:
foreach($this->rows as $k => $row){
$link = hikashop::completeLink('category&task=listing&cid='.$row->category_id.'&name='.$row->alias.$this->menu_id);
echo $this->tabs->startPanel('<a href="'.$link.'">'.$row->category_name.'</a>', 'category_pane_'.$k);

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

Time to create page: 0.066 seconds
Powered by Kunena Forum