0

At the moment, I need to create an app that will dynamically change it's sections

template

This is the app layout.

The main section would be an independent webapp, because it would keep changing it's contents. The nav bar it's basically a set of images that work as buttons and change the contents of the main section. The side bar have some parallel uses, but it can work with the "main webapp" (the one that contains all sections

That's why I think having a nested webapp would be the best solution. I tried google site but since I can't really control it I dropped the idea. But it's possibly to achieve that? At the moment the app need to refresh the whole page to apply even the smallest HTML change

Rubén
  • 34,714
  • 9
  • 70
  • 166
  • It depends on how the web-app to be embeded was set, but for what you are looking to do there are other approaches that might be better. Start by spending some time learning about the pretty basics of developing a web app and [simple page applications (SPA)](https://developer.mozilla.org/en-US/docs/Glossary/SPA). If you need further help, make a more focused question. – Rubén May 02 '22 at 19:43
  • 1
    Take a look at [this](https://stackoverflow.com/a/55770563/7215091) – Cooper May 02 '22 at 20:42

2 Answers2

0

Im a little confused, You could have that part dynamically generate information in the main section and everything else be static.

And the web app will update anytime you change the code weather its a small html changes or logic changes. unless its deployed and you dont have sync on, then you need to manually sync it to show the changes.

Kevin.
  • 78
  • 1
  • 9
  • But I have no idea how I do that. This web app will be used to things like register people that pass in the Lobby, packages that we receive and stuff like that. To each of those functions the main section would need to change, generally presenting a form to deal with that. The nav bar will contain all the buttons that change the main section, but I don't know any other way to update my HTML code without updating the whole page – David Aguiar Aquino Paiva May 02 '22 at 17:25
  • I am assuming you mean update html code by going in there in physically typing it in? you would not need to use another web app for that, word press has plugins that achieve this functionality but it costs money. To build this functionality you need to be able to send data from a form to a database to add guests/ packages too and then use that database to dynamically display data on the page. Its possible, but if your new to programming its going to be overwhelming. – Kevin. May 02 '22 at 17:47
  • No... How can I explain it. I have a lot of restrictions on what solutions I can apply where I work. I can use app scripts, google sheets and other google tools. My concept here is reduce page loading time, since the internet really it's really slow. At the moment, if a user changes what he want to do with the app (let's say from registering when someone entered here to registering a new package that we received) it's need to reload the whole page – David Aguiar Aquino Paiva May 02 '22 at 17:55
  • Even if the only change that happens it's on the main section and nav bar – David Aguiar Aquino Paiva May 02 '22 at 17:56
  • Let's take this page as an example. You don't reload the side bar when you change from Questions to Tags. This is what I want to achieve – David Aguiar Aquino Paiva May 02 '22 at 17:57
0

Update: I solved my issue stacking divs and changing the active one by hiding the others. I also using an include with my templates, in a way I can split my HTML code in a main template.

I use two types of includes:

function include(filename) {


  return HtmlService.createHtmlOutputFromFile(filename).getContent();

}

And

function includeTemplate(template) {


  return HtmlService.createTemplateFromFile(template).evaluate().getContent();

}

one used to include static HTML and other dinamic HTML (templates)