Results 1 to 10 of 10

Thread: Theme Behavior

  1. #1
    Client pdunton's Avatar
    Join Date
    Apr 2006
    Location
    Tucson, Arizona
    Posts
    555
    Squirrelcart version
    v3.4.1

    Theme Behavior

    Testing the new theme process.

    I added an item to "tertiary navigation".
    The theme then failed loading only the main.css.

    What is "tertiary navigation" and how should it be used?

  2. #2
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    I added an item to "tertiary navigation".
    The theme then failed loading only the main.css.
    That doesn't sound related. I just added a navigation block under the "Tertiary Navigation" heading, went to the storefront, and it was fine. All that is going to do is add an additional unused database record and shouldn't impact the way your theme files load in anyway. If you can recreate that from a new session in the beta, provide step by step instructions and I can try to reproduce it again.


    What is "tertiary navigation" and how should it be used?
    The Navigation records in Squirrelcart are now gone. They used to have records for Left and Right navigation by default, to control what navigation blocks appear where.

    That control has now been moved to the theme record. Primary Navigation is what was considered Left Navigation before and can be displayed on any Squirrelcart page as follows:
    PHP Code:
    <?php print sc_nav('Primary'); ?>
    That will print out every nav block designated under "Primary Navigation". Secondary Navigation does the same thing, and is what we used to call Right Navigation:
    PHP Code:
    <?php print sc_nav('Secondary'); ?>
    In the event that you want a theme with yet a 3rd set of navigation blocks, you can make use of that Tertiary Navigation section:
    PHP Code:
    <?php print sc_nav('Tertiary'); ?>

  3. #3
    Client pdunton's Avatar
    Join Date
    Apr 2006
    Location
    Tucson, Arizona
    Posts
    555
    Squirrelcart version
    v3.4.1

    Theme Behavior

    I get into Settings/Themes and select the custom theme.
    Send the "News" nav block to "tertiary navigation."
    Save, close, and exit storefront.

    On store restart, the variant2 css isn't loaded. The default theme is reset to the "800" option. Makes a mess.
    Need to sign back in as admin, delete News from the tertiary nav block. Save and then close out.
    It takes a complete cold restart to work properly again.

    The problem working with this is that it appears the default theme is reset but doesn't show up immediately. This doesn't show up if the storefront is called from cp, only from a complete restart. Does this make sense? Also to clear the problem takes a second startup after the default is reset in Settings/Visual. Looks like some xml hangs around a bit.

    I'm thinking some of my earlier confusion this morning was caused by closing the cp with its exit button instead of going back to the storefront to log out.
    I've been careful now to only log out through the storefront.

  4. #4
    Client pdunton's Avatar
    Join Date
    Apr 2006
    Location
    Tucson, Arizona
    Posts
    555
    Squirrelcart version
    v3.4.1

    One More Problem

    The custom theme has most of the nav blocks provided with the store turned off. This works normally and I see the expected behavior.

    When signing out after signing in (as admin), the storefront displays all the categories/nav blocks as were set originally.

    Set up custom theme, turnoff some of the items included in the original squirrelcart theme, save and exit.

    Call up storefront, log on as admin. You should see the storefront sans items turned off.

    Logoff, see all the turned off items re-appear.

  5. #5
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    Quote Originally Posted by pdunton View Post
    I get into Settings/Themes and select the custom theme.
    Send the "News" nav block to "tertiary navigation."
    Save, close, and exit storefront.
    What do you mean by "exit storefront"? Are you clicking the link to your storefront page? Are you closing your browser window?

    On store restart...
    What do you mean by "on store restart". Are you opening a new browser window and loading your storefront page?

    , the variant2 css isn't loaded. The default theme is reset to the "800" option. Makes a mess.
    Need to sign back in as admin, delete News from the tertiary nav block. Save and then close out.
    It takes a complete cold restart to work properly again.
    I don't know what you mean by cold restart. The store is never started. I'm guessing you are saying you are opening a new browser window after closing your browser.

    I need step by step instructions that can reproduce this in order to address it. I'll need specific information as to everything you are clicking on in order.

    The problem working with this is that it appears the default theme is reset but doesn't show up immediately. This doesn't show up if the storefront is called from cp, only from a complete restart. Does this make sense?
    No.

    Also to clear the problem takes a second startup after the default is reset in Settings/Visual. Looks like some xml hangs around a bit.
    No XML is used in the storefront. The XML config file being saved in your theme folder is only used when installing that theme from scratch. It does absolutely nothing else.

  6. #6
    Client pdunton's Avatar
    Join Date
    Apr 2006
    Location
    Tucson, Arizona
    Posts
    555
    Squirrelcart version
    v3.4.1

    Unable to duplicate now

    Well, after doing the tertiary nav thing a half dozen times and getting consistent results, it now works perfectly.
    When I said exit the storefront I mean loggin off as admin from the storefront page and NOT clicking the cp exit button.

    On store restart, I mean a calling the store in new browser tab window.
    On cold restart I mean calling the store in a new browser instance window.

    I'm afraid I'm not much help but the erratic behavior seen today bothers. It seems pretty easy to confound the theme system and cause various theme variants not to load and reset the default theme to it's 800 variant.

    As I work with the system I'll be sure to take copious notes as I go. I'm half-sure that I am causing these problems inadvertently.

  7. #7
    Client pdunton's Avatar
    Join Date
    Apr 2006
    Location
    Tucson, Arizona
    Posts
    555
    Squirrelcart version
    v3.4.1

    IE7 Origin of Problems

    Found out why I was getting so far off-track today testing the themes functioning.
    I was not religiously doing a master refresh with the browser.
    I'm using IE7 which caches the pages.
    A Ctrl refresh does the trick.

    I do that MOST of the time but it became clear this afternoon as I was logging my moves that I was not doing it EVERY time I made a theme change.

    Sorry for the confusion.

    Onward.

  8. #8
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    Ah, that makes sense. You shouldn't need to refresh in order to see any theme change as that would be inconvenient for a user that doesn't know better.

    There is something that will append a variable to the end of the CSS URLs solely for the purpose of tricking your browser into reloading them. That code isn't working very well in the beta but has been fixed for the final release. It changes the links like this:

    Code:
    <link rel="stylesheet" type="text/css" href="http://www.example.com/squirrelcart/themes/main_street/style_main.css.php?tct=785570001235604696" />
    <link rel="stylesheet" type="text/css" href="http://www.example.com/squirrelcart/themes/main_street/style_variant1_pink.css.php?tct=785570001235604696" />
    <link rel="stylesheet" type="text/css" href="http://www.example.com/squirrelcart/themes/main_street/style_variant2_1024.css.php?tct=785570001235604696" />
    <link rel="stylesheet" type="text/css" href="http://www.example.com/squirrelcart/modules/download/templates/download.css.php?tct=785570001235604696" />
    <link rel="stylesheet" type="text/css" href="http://www.example.com/squirrelcart/themes/main_street/news.css.php?tct=785570001235604696" />
    <link rel="stylesheet" type="text/css" href="http://www.example.com/squirrelcart/modules/quick_total/templates/quick_total.css.php?tct=785570001235604696" />
    <link rel="stylesheet" type="text/css" href="http://www.example.com/squirrelcart/themes/main_street/review.css.php?tct=785570001235604696" />
    <link rel="stylesheet" type="text/css" href="http://www.example.com/squirrelcart/modules/testimonials/templates/testimonials.css.php?tct=785570001235604696" />
    When the theme is changed, that number at the end of the URLs is changed. It then stays the same for subsequent page loads so the CSS files are pulled from cache, until the theme is changed again.

  9. #9
    Client pdunton's Avatar
    Join Date
    Apr 2006
    Location
    Tucson, Arizona
    Posts
    555
    Squirrelcart version
    v3.4.1

    Actually Worse Than That!

    As I've been modifying the templates, I've noticed that I have to do the master refresh thing to see those changes too. Needs a master refresh after nearly every code change made. IE7 is evidently being told there are no changes.

    Going to take a look at Firefox for a development browser.

  10. #10
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    Well...modifying templates that are used on any page that you've already loaded recently will always require a refresh. It's always been that way.

    What I was referring to in my last reply was forcing the browser to reload all CSS files when the theme setting is changed.

    There is no easy way to detect when template files have changed, and it wouldn't be worthwhile as it would add more overhead than it's worth.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

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