Page 33 of 34 FirstFirst ... 2331323334 LastLast
Results 321 to 330 of 332
  1. #321
    Join Date
    May 2016
    Location
    Bucharest
    Posts
    48
    Plugin Contributions
    0

    Default Re: Responsive DIY Template Default for 1.5.x

    Quote Originally Posted by rbarbour View Post
    Which version of the DIY are you using?

    The version via the download section includes an admin layout_controller.php file which adds an extra status to the page "Show this Box @ Min-Width" which allows you to hide specific side-boxes on both tablet and mobile devices.

    The version via the the GIT link in my signature includes an admin layout_controller.php file which adds 3 extra statuses:

    Desktop Status - Uses CSS to Hide Box @ 768px
    Tablet Status - Uses PHP to never even load Box on Tablet Devices
    Mobile Status - Uses PHP to never even load Box on Mobile Devices

    to the page which allows you to hide specific side-boxes for specific devices. Even allows you to display on mobile devices but hide on tablet and desktop.

    --------------------------------------------------------------------------------------

    Without a mobile/tablet navigation menu in place you will want your categories to display, so add a anchor in the categories side-box, when clicked it will scroll to the say "breadcrumbs" right above page contents so the additional scrolling is bypassed.
    Using the 2.1b on 1.5.1, indeed I need to keep my Categories menu (in this case the left side-box), I thought showing it only on the main page would do it, that's why i asked...

    I want to give it a try and do what you said but I'm not sure I understand, "add an anchor" ?

    A

  2. #322
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Responsive DIY Template Default for 1.5.x

    Quote Originally Posted by Adrian Ciocîrlan View Post
    Using the 2.1b on 1.5.1, indeed I need to keep my Categories menu (in this case the left side-box), I thought showing it only on the main page would do it, that's why i asked...

    I want to give it a try and do what you said but I'm not sure I understand, "add an anchor" ?

    A
    In:
    /includes/templates/YOUR_TEMPLATE_FOLDER/common/tpl_main_page.php

    Find:
    PHP Code:
    <!-- bof  breadcrumb -->
    <?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?>
        <div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
    <?php ?>
    <!-- eof breadcrumb -->
    Change to:
    PHP Code:
    <!-- bof  breadcrumb -->
    <?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?>
        <div id="navBreadCrumb" name="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
    <?php ?>
    <!-- eof breadcrumb -->
    Then in:
    /includes/templates/YOUR_TEMPLATE_FOLDER/sideboxes/tpl_categories.php

    Find:
    PHP Code:
            // skip if this is for the document box (==3)
          
    } else {
          
    $content .= '<a class="' $new_style '" href="' zen_href_link(FILENAME_DEFAULT$box_categories_array[$i]['path']) . '">'
    Change to:
    PHP Code:
            // skip if this is for the document box (==3)
          
    } else {
          
    $content .= '<a class="' $new_style '" href="' zen_href_link(FILENAME_DEFAULT$box_categories_array[$i]['path']) . ' #navBreadCrumb">'

  3. #323
    Join Date
    May 2016
    Location
    Bucharest
    Posts
    48
    Plugin Contributions
    0

    Default Re: Responsive DIY Template Default for 1.5.x

    Quote Originally Posted by rbarbour View Post
    In:
    /includes/templates/YOUR_TEMPLATE_FOLDER/common/tpl_main_page.php

    Find:
    PHP Code:
    <!-- bof  breadcrumb -->
    <?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?>
        <div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
    <?php ?>
    <!-- eof breadcrumb -->
    Change to:
    PHP Code:
    <!-- bof  breadcrumb -->
    <?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?>
        <div id="navBreadCrumb" name="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
    <?php ?>
    <!-- eof breadcrumb -->
    Then in:
    /includes/templates/YOUR_TEMPLATE_FOLDER/sideboxes/tpl_categories.php

    Find:
    PHP Code:
            // skip if this is for the document box (==3)
          
    } else {
          
    $content .= '<a class="' $new_style '" href="' zen_href_link(FILENAME_DEFAULT$box_categories_array[$i]['path']) . '">'
    Change to:
    PHP Code:
            // skip if this is for the document box (==3)
          
    } else {
          
    $content .= '<a class="' $new_style '" href="' zen_href_link(FILENAME_DEFAULT$box_categories_array[$i]['path']) . ' #navBreadCrumb">'
    Thank you,

    It's what I need, but it only works on the subcategories page, i kinda wanted it to work on all pages or at least the pages that show products.Did I go wrong somewhere, now my code looks like this in the tpl_categories, it was a bit different than the one you said to look after:

    // skip if this is for the document box (==3)
    } else {
    $content .= '<div class="betterCategories"><a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '#navBreadCrumb">';


    link that dos it right: http://www.epiesedacia.ro/index.php?...#navBreadCrumb

    A

  4. #324
    Join Date
    May 2016
    Location
    Bucharest
    Posts
    48
    Plugin Contributions
    0

    Default Re: Responsive DIY Template Default for 1.5.x

    Hi,

    Can you please bring some light into this, I really want to solve this scorll problem and I'm stuck, I was very happy to see it worked, but it only works on one page.

    If it isn't possible to do the same on certain/all pages or it's very hard to code, at least let me know how do I use the responsive_default, mobile/tablet .php files to show the left categories side-boxes only on the home page.

    Thank you!

  5. #325
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Responsive DIY Template Default for 1.5.x

    Quote Originally Posted by Adrian Ciocîrlan View Post
    Thank you,

    It's what I need, but it only works on the subcategories page, i kinda wanted it to work on all pages or at least the pages that show products.Did I go wrong somewhere, now my code looks like this in the tpl_categories, it was a bit different than the one you said to look after:

    // skip if this is for the document box (==3)
    } else {
    $content .= '<div class="betterCategories"><a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '#navBreadCrumb">';


    link that dos it right: http://www.epiesedacia.ro/index.php?...#navBreadCrumb

    A
    It's not exactly a cut and dry method.

    It works only if a category is selected via the category side-box. The #hash tag " #navBreadCrumb" would have to be added to specific areas of code to work elsewhere.

    Version 2.1b includes a ADMIN file called layout_controller.php which allows you to hide side-boxes on mobile devices.

  6. #326
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Responsive DIY Template Default for 1.5.x

    You could use jQuery to add the #hash

    Code:
    <script type="text/javascript"><!--//
    
    (function($) {
    $(document).ready(function() {
    $("a").attr("href", function(i, href) {
    if( window.location.hostname === this.hostname ) {
    return href + "#navBreadCrumb";
    }
    }); 
      });
    
    }) (jQuery);
    
    //--></script>
    Last edited by rbarbour; 15 Jun 2016 at 02:11 PM.

  7. #327
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Responsive DIY Template Default for 1.5.x

    You could use jQuery wrapped in the included mobile-detect class to just add the #hash on mobile devices

    Code:
    <?php if ( $detect->isMobile() && !$detect->isTablet() || $_SESSION['layoutType'] == 'mobile' ) { ?>
    <script type="text/javascript"><!--//
    
    (function($) {
    $(document).ready(function() {
    $("a").attr("href", function(i, href) {
    if( window.location.hostname === this.hostname ) {
    return href + "#navBreadCrumb";
    }
    }); 
      });
    
    }) (jQuery);
    
    //--></script>
    <?php } ?>

  8. #328
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Responsive DIY Template Default for 1.5.x

    You could add the #hash to all internal links

    /includes/functions/html_output.php

    PHP Code:
        if (!$static) {
          if (
    zen_not_null($parameters)) {
            
    $link .= 'index.php?main_page='$page "&" zen_output_string($parameters) . '#navBreadCrumb';
          } else {
            
    $link .= 'index.php?main_page=' $page '#navBreadCrumb';
          }
        } else {
          if (
    zen_not_null($parameters)) {
            
    $link .= $page "?" zen_output_string($parameters) . '#navBreadCrumb';
          } else {
            
    $link .= $page '#navBreadCrumb';
          }
        } 

  9. #329
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Responsive DIY Template Default for 1.5.x

    You could add any number of mobile menus

  10. #330
    Join Date
    May 2016
    Location
    Bucharest
    Posts
    48
    Plugin Contributions
    0

    Default Re: Responsive DIY Template Default for 1.5.x

    Quote Originally Posted by rbarbour View Post
    You could add the #hash to all internal links

    /includes/functions/html_output.php

    PHP Code:
        if (!$static) {
          if (
    zen_not_null($parameters)) {
            
    $link .= 'index.php?main_page='$page "&" zen_output_string($parameters) . '#navBreadCrumb';
          } else {
            
    $link .= 'index.php?main_page=' $page '#navBreadCrumb';
          }
        } else {
          if (
    zen_not_null($parameters)) {
            
    $link .= $page "?" zen_output_string($parameters) . '#navBreadCrumb';
          } else {
            
    $link .= $page '#navBreadCrumb';
          }
        } 


    Hello again and thank you very much!

    1. I tried the html_output.php method and it works, but after I rewrite the links with CEON URI it doesn't work anymore on the rewritten links, only on the original zen cart type of links ...
    I gues this is what I have to change: 'index.php?main_page=' ...
    Any suggestion?

    2. What file do I have to edit to modify the mobile-detect class? You said that I could do that too, but it seems to appear in more than one file...

    Thanks
    Last edited by Adrian Ciocîrlan; 27 Jun 2016 at 01:11 PM.

 

 
Page 33 of 34 FirstFirst ... 2331323334 LastLast

Similar Threads

  1. Responsive Cold Steel Template for v1.5.x
    By rbarbour in forum Addon Templates
    Replies: 38
    Last Post: 29 May 2017, 03:12 AM
  2. v139h Please help recommend a responsive template for my website
    By augiespanoramas in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 20 Mar 2016, 08:24 PM
  3. v151 Responsive Classic Contemporary Silver Template for 1.5.x
    By rbarbour in forum Addon Templates
    Replies: 28
    Last Post: 19 Feb 2016, 04:04 PM
  4. v154 Column Text layout for responsive template
    By ozetrade in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 28 Apr 2015, 04:12 PM
  5. v139h how do I add my diy template page?
    By linjuming in forum General Questions
    Replies: 2
    Last Post: 13 Apr 2012, 08:40 AM

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