Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2009
    Location
    Scotland
    Posts
    76
    Plugin Contributions
    0

    help question Making current page display in bold letters

    If I view one of the category pages, that page title appears in bold in the category sidebox.

    Can anyone tell me the lines of code in includes/templates/template_default/sideboxes/tpl_categories.php
    that make this happen.

    If I can find this code I can then replicate it in the More Information sidebox, so that the current page being viewed is displayed as bold in the list.

    Many Thanks

    Tog

  2. #2
    Join Date
    Feb 2008
    Location
    Amersham, Buckinghamshire, United Kingdom
    Posts
    141
    Plugin Contributions
    1

    Default Re: Making current page display in bold letters

    It's done by the css
    Code:
    SPAN.category-subs-parent {
        font-weight: bold;
    }

  3. #3
    Join Date
    Dec 2009
    Location
    Scotland
    Posts
    76
    Plugin Contributions
    0

    Default Re: Making current page display in bold letters

    Thanks David,

    Unfortunately that makes things a bit more difficult for me as I cannot see the same piece of code for the More Information box. I tried adding
    SPAN.More_information-subs-parent {
    font-weight: bold;
    }
    But this did nothing, so I must need to add some code elsewhere too.

    Best wishes

    Tog

  4. #4
    Join Date
    Feb 2008
    Location
    Amersham, Buckinghamshire, United Kingdom
    Posts
    141
    Plugin Contributions
    1

    Default Re: Making current page display in bold letters

    Hi Tog
    To achieve what you want I think you would need to add some code to /includes/modules/sideboxes/information.php.
    First copy this file to /includes/modules/sideboxes/YOUR_TEMPLATE/information.php
    Then add the required code. For each of the links you need to check the variable $current_page:
    eg for contact us page change existing code
    Code:
      if (DEFINE_CONTACT_US_STATUS <= 1) {
        $information[] = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>';
      }
    to
    Code:
      if (DEFINE_CONTACT_US_STATUS <= 1) {
        $information[] = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '"'.($current_page=='contact_us' ? ' class="infobold" : '').'>' . BOX_INFORMATION_CONTACT . '</a>';
      }
    then in your css add
    Code:
    .infobold {font-weight:bold}
    I haven't tested it - but that should get you started :)

    Regards

  5. #5
    Join Date
    Dec 2009
    Location
    Scotland
    Posts
    76
    Plugin Contributions
    0

    Default Re: Making current page display in bold letters

    Thanks David

    Yes, that is the code that needs changing. Unfortunately your suggestion has an error somewhere, but I can't find it. If I use it as is I get the rest of the code on that page greyed out (Using Ultra Edit), and when the site is accessed everything after the information box has disappeared.

    I think it is a syntax problem within the code in red above, but cannot see what the problem is. I have tried removing ' and substituting " in a couple of places but that does not help. I will play around some more with it as I am sure the answer is very close now.

    Best wishes

    Tog

  6. #6
    Join Date
    Feb 2008
    Location
    Amersham, Buckinghamshire, United Kingdom
    Posts
    141
    Plugin Contributions
    1

    Default Re: Making current page display in bold letters

    Hi - think I see the problem
    Code:
     if (DEFINE_CONTACT_US_STATUS <= 1) {     $information[] = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '"'.($current_page=='contact_us' ? ' class="infobold"' : '').'>' . BOX_INFORMATION_CONTACT . '</a>';   }
    see the missing ' (in blue)

    Regards

  7. #7
    Join Date
    Dec 2009
    Location
    Scotland
    Posts
    76
    Plugin Contributions
    0

    Default Re: Making current page display in bold letters

    That's it David,

    Thank you so much for your help. I have just added your Google Recaptcha plug in too, so that is a double thank you :-)

    Best wishes

    Tog

  8. #8
    Join Date
    Feb 2008
    Location
    Amersham, Buckinghamshire, United Kingdom
    Posts
    141
    Plugin Contributions
    1

    Default Re: Making current page display in bold letters

    Glad it works now

    Regards

 

 

Similar Threads

  1. Making text price depend on type of letters
    By stevecov in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 7 Jul 2009, 07:29 PM
  2. Making certain items bold in Confirmation Email
    By JasonRSI in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 25 Jan 2008, 05:48 PM
  3. Help making category-top bold
    By dinki in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 25 Oct 2006, 11:05 PM
  4. making categories bold
    By ner0tik in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 10 Aug 2006, 10:23 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR