Page 1 of 1

Hide Certain Category

Posted: Tue Aug 20, 2013 8:21 pm
by johnnet
Hi,

1) is there a way that I can hide certain category on the left category list? i've tried enter -9999 to the sorting, its still show.

2) Design Layout Override - I've create a new design in layout name "portfolio" & route it to - "information/porfolio".
i also create a portfolio.tpl in information folder, the problem is i wanted just to change the page head title only but not the navigation category.

eg: if category name "portfolio" the default title would be "portfolio"
but how possible to just modify the title to"portfolio gallery" ?
-----portfolio.tpl------
<div class="pagehead">
<h1>PORTFOLIO GALLERY</h1>
<div>

please help. thanks

Re: Hide Certain Category

Posted: Wed Aug 21, 2013 4:16 am
by Xyph3r
Hello.

I will give you a fast answer to no.1.

For a default template..i've changed

<li> with <li class="item<?php echo $category['category_id']; ?>">

Code: Select all

<div class="box">
  <div class="box-heading"><?php echo $heading_title; ?></div>
  <div class="box-content">
    <ul class="box-category">
      <?php foreach ($categories as $category) { ?>
      <li class="item<?php echo $category['category_id']; ?>">
        <?php if ($category['category_id'] == $category_id) { ?>
        <a href="<?php echo $category['href']; ?>" class="active"><?php echo $category['name']; ?></a>
        <?php } else { ?>
        <a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
        <?php } ?>
        <?php if ($category['children']) { ?>
        <ul>
          <?php foreach ($category['children'] as $child) { ?>
          <li>
            <?php if ($child['category_id'] == $child_id) { ?>
            <a href="<?php echo $child['href']; ?>" class="active"> - <?php echo $child['name']; ?></a>
            <?php } else { ?>
            <a href="<?php echo $child['href']; ?>"> - <?php echo $child['name']; ?></a>
            <?php } ?>
          </li>
          <?php } ?>
        </ul>
        <?php } ?>
      </li>
      <?php } ?>
    </ul>
  </div>
</div>
<style>.box .box-category .item10(the number is an example, You put here the categoryid that you want to remove) {display:none;}</style>

Re: Hide Certain Category

Posted: Wed Aug 21, 2013 9:05 am
by johnnet
Hi Xyph3r,

Thanks for your reply, very much appreciate your help, i'm using OC 1.5.5.1 & my code look like this,

Code: Select all

<div class="box category-links">
	<div class="box-heading header-3"><?php echo $heading_title; ?></div>
	<div class="box-content">
		<div class="box-category col-links">
			<ul>
				<?php foreach ($categories as $category) { ?>
                <li class="item<?php echo $category['category_id']; ?>">
				<?php if ($category['category_id'] == $category_id) { ?>
				<li class="active">
					<a href="<?php echo $category['href']; ?>" class="active"><?php echo $category['name']; ?></a>
				<?php } else { ?>
				<li>
					<a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
					<?php } ?>
					<?php if ($category['children']) { ?>
					<ul>
						<?php foreach ($category['children'] as $child) { ?>
						<li>
							<?php if ($child['category_id'] == $child_id) { ?>
							<a href="<?php echo $child['href']; ?>" class="active"><?php echo $child['name']; ?></a>
							<?php } else { ?>
							<a href="<?php echo $child['href']; ?>"><?php echo $child['name']; ?></a>
							<?php } ?>
						</li>
						<?php } ?>
					</ul>
					<?php } ?>
				</li>
				<?php } ?>
			</ul>
		</div>
	</div>
</div>
<style>.box .box-category .item10(the number is an example, You put here the categoryid that you want to remove) {display:none;}</style>


1) i disable SEO url& i found my category id (index.php?route=product/category&path=110) I place it, but still showing, M i wrong, sorry. will it work if i turn on SEO url option?:

Code: Select all

<style>.box .box-category .item110(the number is an example, You put here the categoryid that you want to remove) {display:none;}</style>

Re: Hide Certain Category

Posted: Wed Aug 21, 2013 7:33 pm
by Xyph3r
Try this

Code: Select all

<div class="box category-links">
   <div class="box-heading header-3"><?php echo $heading_title; ?></div>
   <div class="box-content">
      <div class="box-category col-links">
         <ul>
            <?php foreach ($categories as $category) { ?>
                <li class="item<?php echo $category['category_id']; ?>">
            <?php if ($category['category_id'] == $category_id) { ?>
            <li class="item<?php echo $category['category_id']; ?> active">
               <a href="<?php echo $category['href']; ?>" class="active"><?php echo $category['name']; ?></a>
            <?php } else { ?>
            <li>
               <a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
               <?php } ?>
               <?php if ($category['children']) { ?>
               <ul>
                  <?php foreach ($category['children'] as $child) { ?>
                  <li>
                     <?php if ($child['category_id'] == $child_id) { ?>
                     <a href="<?php echo $child['href']; ?>" class="active"><?php echo $child['name']; ?></a>
                     <?php } else { ?>
                     <a href="<?php echo $child['href']; ?>"><?php echo $child['name']; ?></a>
                     <?php } ?>
                  </li>
                  <?php } ?>
               </ul>
               <?php } ?>
            </li>
            <?php } ?>
         </ul>
      </div>
   </div>
</div>
<style>.box .box-category .item10(the number is an example, You put here the categoryid that you want to remove) {display:none;}</style>

Re: Hide Certain Category

Posted: Wed Aug 21, 2013 7:56 pm
by johnnet
Hi Xyph3r,

Thank you for your help & reply, i've added the code seems nothing change, am i did something wrong? or i need edit else where? :/.

Re: Hide Certain Category

Posted: Fri Aug 23, 2013 12:38 pm
by johnnet
as I remember last time if i set the sort order to -1, it will hidden from the listing, but not in this version anymore.. help are greatly appreciate. tq