Submit html pages without Site-wide Code

I’m having a real problem here with a new “feature” in RW6.

Background:
I like to keep a lot of html pages in RW that I upload to my server as include files. They are text files that contain lists of items, ad code, and other small blocks of modular code that I can update remotely without needing to use RW and/or upload pages. They are called into my web pages using a php include statement throughout different parts of the website.

Problem:
When I upload these text files, I make sure the Apply Theme and Use Master Style checkboxes are unchecked so I would assume that this bare bones clean file would upload with only my text but it does not. Any code listed in Site-wide Code is appended to the document assuming that this is a web page.

Question: How can I publish a plain html page with none of the site-wide code appended onto it? I would think that there would be an option in the Inspector to allow me to turn off any site-wide code.

If there is no way then this is a big oversight in RW and should be addressed with a simple checkbox to allow submission of clean files.

Wouldn’t the simplest thing be to create a second project for those files?

Which page type are you using? HTML? Isn’t there the page option to NOT use the theme?

Exactly right. The checkbox to use the theme is unchecked meaning nothing should be added to my html page.

The simplest thing would be to handle all of these files in a separate project but that’s a work around. The real issue is I shouldn’t have to work around this as nothing should be included in the file when the Apply Theme button is NOT checked.

The problem here is that the code you are entering in Site-Wide code is just that. It is not coming from any theme, it is what you are specifically telling RapidWeaver to include on each and every page. So I would argue that a separate project is not really a “work around” in the sense that you imply. RapidWeaver is just doing exactly as you tell it to do. The other course of action would of course to be to revert to the “old way” and just include the code in the page inspector for the pages that require it although, I concede, this is obviously much more cumbersome than the second project option and not one that I would personally entertain.

I sympathise, but essentially, what you are asking for is a “Site-Wide Except These Pages” code area. That would require a whole new UI interface element to be able to check and uncheck included pages and one which would probably cause more confusion for the average user than the additional functionality that it brings to the advanced edge case such as yours.

Of course, you could always just add the code to individual pages.

I think I may have found a solution to this. If you use a blank theme (I tried it with Joe Workmans Blank theme) then anything you add to the Header section of site wide code is NOT added.

So, assuming that what you are adding is CSS then instead of adding it to the CSS area of site wide code, you could add it to the Header area and just wrap it in <style> ..... </style> tags. This will then only get added to pages where your main theme is applied rather than ending up in the consolidated.css file.

The caveat to this is that it is not a great idea to add a ton of CSS to the <head>, but assuming that it is a moderate amount then there should be no problem.

Or create a separate CSS file and link to it.

@peterdanckwerts Yes, if there is a lot of code this would be preferable although for a small amount I personally would rather not introduce another http: request

I see what you are saying but unfortunately none of my separate files are CSS. They are mostly individual ads and “widgets” that I can configure independently so on my web page I can just include(widget) and never have to upload the page again since I can just swap out widgets for that space on the page from anywhere since it’s just a text file.

I don’t know the inner workings of the development but I would like a checkbox to not add anything to the page. One way would be to add another section like Resources and put all of those types of pages in there where all pages in that section are not modified. I don’t really know the answer but I’m thinking I have to go with a separate project file which is a real bummer.

So does it not work if you apply the blank theme to your widget pages etc rather than using the main theme - this should not bring any styling with them and they can all stay within the same project - that is certainly the closest thing to a vanilla import although admittedly you are still importing an html page. If not, what about a PlusKit @include?

Unfortunately, the Blank theme still gives the same results. :frowning:
I have used PlusKit on many projects but it’s not very compatible with Foundation in my current experience trying to make it work. There are a lot of side effects when used with the Foundation theme (current project) where it wouldn’t work or it would disable seemingly unrelated parts of my site. I have decided to use Partials (Stacks 3) instead which is working quite nicely.

Even though Partials is great, it still requires re-publishing pages if you make a change to a Partial that is used throughout the site. My site is quite complex and very large so it’s not too practical since I am unable to just republish the entire site. To make a long story short, I have to do it in chunks since some pages use certain stacks that don’t work too well with dynamic content and php code within stack fields in the inspector, i.e., it will encode some of my php code that requires me to export, decode it, and then publish. The complexity is what has directed me to creating small “widgets” outside of Rapidweaver that are editable with a text file without changing the RW page structure.

Thats me out of ideas then as well - sorry. Looks like it is back to managing them outside of RapidWeaver, at least for now.