Public Ticket #3639

sidebar menu list in external html file issues

Closed
Comments
DexignLab
Khelesh Mehra replied 1 week ago on September 15, 2022 at 07:11 AM

Hello Adham,

You can change HTML files to PHP files and use the include statement.

Step 1. Change HTML (.html) file extension to PHP (.php) file extension.

Step 2.  Now, you use the include statement for files.

https://www.w3schools.com/php/php_includes.asp

Thanks

DexignZone Team

DexignLab
Adham Aboud replied privately 1 week ago on September 14, 2022 at 05:29 PM

Thank you Khelesh,

I really appreciate your help. Can you please offer another way to include external code, instead of  the way I'm using?

Best,

DexignLab
Khelesh Mehra replied 1 week ago on September 14, 2022 at 06:31 AM

Hello Adham,

This is not an HTML attribute or not any library-based attribute. It's a custom code attribute that gives by the w3school developer for developers' use.

https://www.w3schools.com/HOWTO/howto_html_include.asp

This function also has some little issues that's why it's not working. You need to correct the code and load this function before other js files (like metis menu extra).

Thanks

DexignZone Team

DexignLab
Adham Aboud replied privately 1 week ago on September 13, 2022 at 06:03 PM

I'm still working locally!

Just take the code from any file of the examples you provide and put it in separated HTML file! then call it like that....

<div class="deznav">

 <div class="deznav-scroll mm-active ps">

  <div w3-include-html="./side-bar.html"></div>

  <div class="copyright">

   <p><strong>Zenix Crypto Admin Dashboard</strong> © 2021 All Rights Reserved</p>

   <p class="fs-12">Made with <span class="heart"></span> by DexignZone</p>

  </div>

 </div>

</div>

DexignLab
Yamini Gaur replied 2 weeks ago on September 13, 2022 at 09:28 AM

Hello Adham Aboud,

Thanks for being our customer.

Please share your demo URL with us so we detect the issue properly.

Thanks

DexignLab
Adham Aboud replied started the conversation 2 weeks ago on September 12, 2022 at 06:41 PM

Hello dear,

I'm using the sidebar in a project that have several html file, to save duplicating the sidebar code I opened an HTML file for the side bar list (starting at

ul) and called it using the w3-include-html method.

The problem is that when I'm doing that I'm loosing functionalities of the sidebar! for Example all the items of the menu is always open (It's not collapsed)!

Is there a way to solve the problem ?

Thanks,