Jump to content

<head> Add On


Go to solution Solved by Daniel F,

Recommended Posts

23 minutes ago, teraßyte said:

I don't remember any such existing modification that does this, but it would be a quick one to write.

Quick for whom?  🙂  It would take me many months to learn how.

I can think of several options that would be helpful.

At the beginning and end of head, and at the beginning and end of body.

If you make it, please leave a link to your site so I can buy it.

Link to comment
Share on other sites

  • 1 month later...
On 12/16/2023 at 8:56 AM, Jim M said:

Yes, this is a part of the core solution so will be a part of unmodified theme updates from release to release.

So I just updated my site to 4.7.15 and updated my themes, all from @Ehren.

The default IPS theme was maintained, but the other themes had the code deleted.

Is that expected?

Thanks

Link to comment
Share on other sites

3 hours ago, Matt said:

What was deleted? This was a standard upgrade that would not remove data from custom themes. 

In December, I added JS to Theme --> Custom theme by Ehren --> Header and Footer --> Footer HTML.

Yesterday I updated the site to 4.7.15.

Then, I updated 5 themes I have by Ehren.

All five themes had the JS removed from the Footer HTML field.

Link to comment
Share on other sites

40 minutes ago, Square Wheels said:

In December, I added JS to Theme --> Custom theme by Ehren --> Header and Footer --> Footer HTML.

Yesterday I updated the site to 4.7.15.

Then, I updated 5 themes I have by Ehren.

All five themes had the JS removed from the Footer HTML field.

Reproduced as follows;

  1. Create a brand new theme
  2. Download the theme using the option in the console
  3. Edit the theme, populate the header and footer bits via the available tab.
  4. Review site on front-end, verify items are there.
  5. Use the "Upload a new version" option on the theme, and use the XML file that was downloaded in step 2
  6. Edit the theme - the previously added header/footer content is gone
  7. Review site on front-end, the previously added header/footer content may still be there in the theme. If so...
    • Run support tool to clear caches
    • Review site on front-end, the previously added header/footer content are now gone.
Link to comment
Share on other sites

  • Management

Hmm. I can see why the code does that. The XML does not have header/footer, so any changes to those areas look to be reset when you upload a "new" version which does not have any header/footer code so the theme represents what is in the XML.

I guess what you're asking for is header/footer code to persist through upgrades? It may mean you get some conflicts you'll need to manually manage.

Link to comment
Share on other sites

6 minutes ago, Matt said:

I guess what you're asking for is header/footer code to persist through upgrades? It may mean you get some conflicts you'll need to manually manage.

Yes, that would be preferred.

I purchase the branding-free option.  I previously made a CSS edit.  I get asked each time if I want to keep the new or the old template.  This would be the same.

For now, I'll remember to add the code back.  I use it for a help bot.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...