Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Blank Page, layout-partial not loading


Hi,
I built my Layout with layout-builder URL.html
It creates metronic_html_v8.2.0-1689961543 zip file with 2 folders and the index file.
I copy that folder and the index.html file to my spring project.

Now, I start my app and there is no errors on navigator console. Not even in STS IDE console.

Just a blank page. I find these pages are not loaded:

layout-partial:partials/theme-mode/_init.html
layout-partial:layout/partials/_page-loader.html
layout-partial:layout/_default.html
layout-partial:partials/_scrolltop.html

layout-partial:partials/modals/_upgrade-plan.html
layout-partial:partials/modals/_view-users.html
layout-partial:partials/modals/users-search/_main.html
layout-partial:partials/modals/_invite-friends.html

Of course all those files exists in their correct folder and are not commented.

Product: Metronic 8.1.8 and 8.2.0 (spring boot ptoject)
Java 17, IDE STS4, spring 3.1.1

Need help, please.
Thanks.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (4)


Update:
Navigator code from index.html show empty values for each layout-partial:

<layout-partial:layout partials="" _page-loader.html="">



Hi,

The paths you mentioned, such as "layout-partial:partials/theme-mode/_init.html" and others, are sample reference paths used in HTML comments. These references are intended for the Metronic HTML version and not for direct use in a Spring Boot project.

To properly include the layout partials in your Spring Boot application, you should use Spring Boot's include function to include the relevant HTML files. For example, you can use "th: replace" attribute to include the layout partials in your HTML templates.

Here's an example of how you can include a layout partial in your HTML template:

<div th:replace="partials/theme-mode/_init.html"></div>


Replace "partials/theme-mode/_init.html" with the correct path to the layout partial you want to include.

By using the appropriate include functions provided by your Spring Boot template engine, you should be able to properly include the layout partials and resolve the issue with the blank page.

If you encounter any other issues or need further assistance, please feel free to ask. Thank you!



Hi,
It works now.
Thank you very very much.



The topic is really interesting and I found it informative. For code development, you need to really understand how to build programs without errors basketbros


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(