I am using this to document a quirk with the Global Header code block and variable. This is for the following code that is populated from the Settings => Design => Header and Footer.
This block of code requires you to have either a "[ ]" characters or a HTML tags between the start and stop html commands to work. You can use a real variable ([storename]), a dummy variable ([dummy]), the left and right backets - [ ], or any html tag.
Global Header Dis-enabled (turned off).
The html code between the start and stop commands will show on you web pages. This means if you are using a [dummy] or just the [ ], it will appear.
Global Header Enabled
The content defined in the Admin at Header and Footer => Global Header will show up as designed.
(If you really want to see 3dcart go crazy, try just placing one space between the start and stop html commands with the global header enabled with content included.)
This Quirk only impacts the Global Header. The Global Footer, Global Left Banner and Global Right Banner do not exhibit these behaviors.
There are a couple of work arounds:
1. Place the [ ] between the start and stop html commands. Enable the Global Header. Leave the field blank or only place spaces in the admin system. The dummy [ ] will disappear and the variable does not take any space in the resulting html. You can then add or remove content as needed.
2. A more permanent fix is the following code.
This will allow you to use the admin system without having to remember to keep the Global Header enabled with an empty field. The code block will behave like the rest of the 3dcart variables.
Why and How did I find this:
I am using this code block to show images for sales, clearances, free shipping, etc. At times, this code block will be empty. I was using a [global_header] variable between the start and stop html commands. The variable kept showing when I dis-enabled the content. It was annoying me and I had to figure out what was happening.
A ticket has been opened with 3dcart on this issue.
jeff
HTML Code:
<!--START: global_header--><!--END: global_header-->
Global Header Dis-enabled (turned off).
The html code between the start and stop commands will show on you web pages. This means if you are using a [dummy] or just the [ ], it will appear.
Global Header Enabled
The content defined in the Admin at Header and Footer => Global Header will show up as designed.
(If you really want to see 3dcart go crazy, try just placing one space between the start and stop html commands with the global header enabled with content included.)
This Quirk only impacts the Global Header. The Global Footer, Global Left Banner and Global Right Banner do not exhibit these behaviors.
There are a couple of work arounds:
1. Place the [ ] between the start and stop html commands. Enable the Global Header. Leave the field blank or only place spaces in the admin system. The dummy [ ] will disappear and the variable does not take any space in the resulting html. You can then add or remove content as needed.
2. A more permanent fix is the following code.
HTML Code:
<!--START: global_header--> <span style="display:none;"></span> <!--END: global_header-->
Why and How did I find this:
I am using this code block to show images for sales, clearances, free shipping, etc. At times, this code block will be empty. I was using a [global_header] variable between the start and stop html commands. The variable kept showing when I dis-enabled the content. It was annoying me and I had to figure out what was happening.
A ticket has been opened with 3dcart on this issue.
jeff
Comment