Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2006
    Location
    Melbourne, Australia
    Posts
    377
    Plugin Contributions
    0

    Default remove link from category name

    How do I remove the link function from:

    <? php echo '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $_GETcPath, 'NONSSL') . '">' . $category_icon_display_name . '</a>'; ?>

  2. #2
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: remove link from category name

    Back up a bit ... what business issue brings you to the place of asking that specific technical question?
    What's the problem you're trying to solve? and why?
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Mar 2006
    Location
    Melbourne, Australia
    Posts
    377
    Plugin Contributions
    0

    Default Re: remove link from category name

    Nothing complicated. I just don't want the category name at the top of the product page to function as a link, that being - I thought - the easiest way to apply css to that alone. I've spent half the day trying to work that out. The other half trying to get the category name to site next to the category icon, rather than below it. Failed on both counts!

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: remove link from category name

    If your root purpose is to style the category name, that can be done without touching its link code. Seeing the page live will let us advise on the best way to move/style it.

  5. #5
    Join Date
    Mar 2006
    Location
    Melbourne, Australia
    Posts
    377
    Plugin Contributions
    0

    Default Re: remove link from category name


  6. #6
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: remove link from category name

    Try just changing a setting:
    Admin->Configuration->Product Info->Previous Next - Navigation Includes Category Position ... set it to Off
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Mar 2006
    Location
    Melbourne, Australia
    Posts
    377
    Plugin Contributions
    0

    Default Re: remove link from category name

    That leaves me neither icon or category name. I want to use both, with category name to the right of the icon, vertically aligned half way down the image, or thereabouts, and without the category name functioning as a link.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: remove link from category name

    Odd ... but ... whatever ...

    Assuming the PHP code you quoted in your first post is indeed the correct code to deal with what you want to change (I've NOT checked that), then you would change it as follows ...
    Quote Originally Posted by godt View Post
    How do I remove the link function from:

    <? php echo '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $_GETcPath, 'NONSSL') . '">' . $category_icon_display_name . '</a>'; ?>
    It's basic HTML inside a PHP statement, so removing the <a href>...</a> bit would become this:
    Code:
    <?php echo $category_icon_display_name; ?>
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Mar 2006
    Location
    Melbourne, Australia
    Posts
    377
    Plugin Contributions
    0

    Default Re: remove link from category name

    Here is my tpl_modules_category_icon_display.php

    <div align="<?php echo $align; ?>" id="categoryIcon" class="categoryIcon"><?php echo '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $_GET['cPath'], 'NONSSL') . '">' . $category_icon_display_image . $category_icon_display_name . '</a>'; ?>

    <?php echo $category_icon_display_name; ?></div>

    My original post was code I had having separated the image from the name, but here, I revert to the whole thing. When I add the basic echo, as above, nothing at all appears!

  10. #10
    Join Date
    Mar 2006
    Location
    Melbourne, Australia
    Posts
    377
    Plugin Contributions
    0

    Default Re: remove link from category name

    Same with original code removed.

 

 

Similar Threads

  1. v151 Remove category name from meta
    By Kevin205 in forum General Questions
    Replies: 6
    Last Post: 19 Apr 2013, 08:52 PM
  2. Replies: 2
    Last Post: 30 Jun 2011, 07:37 PM
  3. Remove / Hide category link from category image on home page
    By Sushigal in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 15 Mar 2010, 11:50 PM
  4. remove category name from product listings
    By riotproject in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 5 Aug 2008, 01:00 AM
  5. How to remove category name from category page?
    By faithofgod in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 1 Mar 2008, 09:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg