Set a homepage to Draft

In order to help mange my new website build, the site itself is broken into multiple RapidWeaver projects. We have a project for the main site, demos and admin area. RapidWeaver requires that every project have a home page. It would be super nice if there was a way not to have a homepage set in a project.

I know that many users would love this feature as well. Maybe simply the ability to set to homepage as “Draft” could do the trick.

I should add that the homepage currently has the Draft option as disabled. I can understand this. What if it were enabled and a warning be displayed if it is checked? Similar to the one you get when you try not to delete the homepage.

@dan what are your thoughts on this one?

I’m not sure I know what would happen if RW doesn;t get to set a “Homepage”. RW kinda needs a reference to the homepage. tbh. I’ve not really looked into it or thought through the implications yet…

In theory, this should be doable but we need more time to look into it.

Might be simply. Might not be. I’ll add it to the 8.0.1 milestones.

1 Like

We can have a page set as the home page. But allow it to be set as draft so that it does not get published.

But that would create some other weird quirks:

  • where would the rw_common folder get published?
  • project backup files?
  • .htaccess?

I think rather than thinking about the implementation detail – try to sort out exactly what problem you’re trying to solve and then find the implementation that fits best.

Are you trying to break a site up into sub-projects? Or are you trying to publish a single page into an already complete site. Both of these problems lack a homepage – but i think that’s where their similarities stop.

I am fine with the rw_common folder and all of its contents being published. It would be published in the same location as the other project files. You do not want multiple rw_common folders in different locations.

Let me explain the setup for my current project. I have 3 projects setup for Weaver’s Space right now.

  • The main project file that contains most of the site with the exception of the next two locations.
  • The 2nd project is for the demo pages. All of these pages live inside /demo
  • The 3rd project file is for the admin pages. All of these pages live inside /admin

For the demo pages, the project file is setup with a homepage as /index.php that is completely blank. This is because the home page for the site is inside of the main site project. This demo project file is published to the same folder as the main project file. This is so that the same rw_common files are used on all pages. Obviously we want this for browser caching. Every page (except for the homepage) in this project is set to have a folder inside demo. For example: /demo/movingbox

The admin project is the same setup. s/demo/admin/

One thing that I tried is to set the homepage page name inside the demo and admin projects to dummy.php. This is so when I publish the files, they do not override the main project’s index.php file. However, the asset folder for dummy.php is still files, not dummy_files like older RW versions would do. Therefore, the Stacks page CSS and JS files from the main project file get overwritten.

This is why I thought setting the draft on the home page of the demo and admin projects would completely solve my situation. I am open to other ideas though.

I hope that this makes sense now. I am not the only person that does this. I know many users that split larger website builds into multiple project files. I know these users would greatly appreciate it if this workflow worked just a tad better.

So, you’ve basically got one project, but you’ve broken it into three files… because why?

  • file too large?
  • too slow to open/save?
  • some interesting technical reason why it makes sense to publish it in three pieces.

Clearly the simplest solution is to NOT break it up into three files.

Perhaps it would be easier to make it so you DON’T NEED TO do this rather than making it so you CAN do this???

But thinking through your solution a bit… I think you’re only addressing the simplest most obvious problem of the index file name collision.

The collisions inside rw_common folder CONTENTS would be much harder to solve. The contents of that folder are not identical between projects. Nor are the names of the files guaranteed to be unique. And files with non-unique names like stacks_page.css, are not guaranteed to have the same contents from project to project.

You might be able to wing it – a bit – so long as all of your pages were stacks pages or built-in pages and all of your stacks were foundation stacks – that would ensure that all the different project files contained the same rw_common css and js – but that’s kind of a contrived situation, probably useful mostly to people with the last name Workman :stuck_out_tongue_closed_eyes:

Would it help if RapidWeaver had a way to manage sub domains in the sidebar, almost like splitting your project up into sections.

Not sure if this is a good idea, just floating it out there…

Why am I breaking up my project?

Originally we broke the site into 2 projects. demos & rest of site.

The demos take up 120+ pages. They do not contain any of the design elements from the main site. Plus it felt cleaner to constant work on a project that had 120 less pages that really did not need to be changed at all.

As I was working with Jon Hawkins on the project, it was a bottleneck trying to both work on one project file. By splitting the admin and website up into different projects, at least each of us could be working on a part of the site at the same time. The admin area also has a completely different look and feel than the rest of the site so this did not seem unusual.

This really is not just a crazy workman thing… users have been splitting projects up for years. I don’t know their reasons. I assume that its an attempt to keeping file size down. As RapidWeaver grows, it definitely is being used by professionals to create some pretty amazing stuff. If the pros need to break up project files in order to make their workflows happen, then I think that it’s a situation that needs to be taken in account.

Not sure how subdomains factor into this. Maybe you meant something different? All three of my projects will get published to https://www.weavers.space.

This is the problem that I am ultimately trying to solve. When I publish my main project file, everything works. When I then publish either of the 2 other projects after that, the following 2 files get overwritten.

https://thefuture.weavers.space/files/stacks_page_page0.js
https://thefuture.weavers.space/files/stacks_page_page0.css

In order to fix, I need to republish my main project file again. This has gotten me thinking though…

Stacks places the original page id into the asset files. So in theory, if I create a new page and make that the homepage, it will no longer be page0. Hence publishing it wont overwrite the original files. Hmmm…

We’ve been discussing this internally, which is maybe where @dan got the idea of subdomains.

It seems like the most straightforward thing for you to do would be to host each site on a different subdomain - admin.weavers.space, for example.

The other thing we need to do, as @isaiah mentioned, is understand why you’re using multiple projects. If it’s to work around old RapidWeaver slowness, perhaps we’ve fixed that? Drag the pages from your sub projects into your main project and see if that works for you. Take a backup first!

My idea about creating a new homepage so that it has a different page ID actually works perfectly.