Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    28
    Plugin Contributions
    0

    Default Overriding breadcrumb & filenames.php

    I am creating a custom template and need to modify includes/application_top.php and includes/filenames.php files for additional entries.

    Is there an override option available for these files or are these one of the few files that does not have the ability to override?
    Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a person does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses their intelligence.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Overriding application_top.php & filenames.php

    Why exactly do you feel you need to override these?

    Almost all of the application_top bootstrap is handled via the init_includes folder contents, for where there is override support.

    As for adding additional filenames definitions, it's best just to place a new file in the /includes/extra_datafiles folder containing JUST the new filename defines needed for your project. These files are auto-loaded during the initialization phases.
    .

    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
    Sep 2006
    Posts
    28
    Plugin Contributions
    0

    Default Re: Overriding application_top.php & filenames.php

    Quote Originally Posted by DrByte
    Why exactly do you feel you need to override these?

    Almost all of the application_top bootstrap is handled via the init_includes folder contents, for where there is override support.

    As for adding additional filenames definitions, it's best just to place a new file in the /includes/extra_datafiles folder containing JUST the new filename defines needed for your project. These files are auto-loaded during the initialization phases.
    I didn't need to override the filenames.php but rather needed to add additional filename defines, which you provided the answer to. Thank you for that.

    I want to edit the application_top.php file to remove the Home breadcrumb from appearing on the main index page. I am assuming it is there since I am used to osC but am most likely wrong on that assumption.
    Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a person does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses their intelligence.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Overriding application_top.php & filenames.php

    To add additional filenames there is a directory for:
    /includes/extra_datafiles

    Create a php file such as myfilenames.php and add it there ...

    This way, it never gets overwritten during an upgrade and will load as if part of the original file:
    /includes/filenames.php
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Overriding application_top.php & filenames.php

    /me polishes her glasses ...

    Read screen ... re-read screen ... walk away and re-read screen for already answered question ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Sep 2006
    Posts
    28
    Plugin Contributions
    0

    Default Re: Overriding application_top.php & filenames.php

    Thank you for the follow-up Ajeh.

    Any idea on removing the Home leading breadcrumb entry when on the main index page?
    Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a person does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses their intelligence.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Overriding application_top.php & filenames.php

    Quote Originally Posted by Akoza
    I want to edit the application_top.php file to remove the Home breadcrumb from appearing on the main index page. I am assuming it is there since I am used to osC but am most likely wrong on that assumption.
    In v1.3.5 and onward, there's a really easy way to do this:

    /includes/templates/YOURTEMPLATE/common/tpl_main_page.php
    approx line 94:
    Code:
    <!-- bof  breadcrumb -->
    <?php if (DEFINE_BREADCRUMB_STATUS == '1') { ?>
        <div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
    <?php } ?>
    <!-- eof breadcrumb -->
    simply add a check for $this_is_home_page like this:
    Code:
    <!-- bof  breadcrumb -->
    <?php if (DEFINE_BREADCRUMB_STATUS == '1' && !$this_is_home_page) { ?>
        <div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
    <?php } ?>
    <!-- eof breadcrumb -->
    .

    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.

  8. #8
    Join Date
    Sep 2006
    Posts
    28
    Plugin Contributions
    0

    Default Re: Overriding breadcrumb & filenames.php

    Absolutely perfect!

    Thank you so much.
    Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a person does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses their intelligence.

  9. #9
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,684
    Plugin Contributions
    11

    Default Re: Overriding breadcrumb & filenames.php

    AND...
    In 1.3.7, turn it off in the Admin>Layout Settings>Define Breadcrumb Status.

    2 will turn it off on the home page only.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  10. #10
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Overriding application_top.php & filenames.php

    These files cannot be overridden.

    You can however create a php file (your_name.php) which would include the defines for your filenames and place this file in:

    includes -> extra_datafiles

    I think you can do the same thing for the application_top.php

    create your_own_file.php and place this file in:

    includes -> extra_cart_actions

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Meta_tags.php not overriding english.php
    By Servelan in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 19 Apr 2011, 12:21 AM
  2. Replies: 6
    Last Post: 11 May 2009, 03:35 AM
  3. is there an override to includes/filenames.php?
    By R1ckster in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 20 Sep 2007, 10:51 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