Jump to content

W3.js includeHTML()


OliSig

Recommended Posts

Hi,

<div w3-include-html="content.html"></div>

works fine for me; so does:

<div w3-include-html="folder/content.html"></div>

but

<div w3-include-html="../folder/content.html"></div>

does not i.e. picking up a code from a parallel folder.

Please advise

OliSig

Link to comment
Share on other sites

Is this the layout of your files?

  • [THIS_DIR]
    • [THIS_PAGE]
    • content.html (first example)
    • folder
      • content.html (second example)
  • folder
    • content.html (third example)
Link to comment
Share on other sites

The structure is like this:

1: ok
http://www.abc.de/kor/home/index.html
http://www.abc.de/kor/home/content.html
 "index.html" includes: <div w3-include-html="content.html"></div> 

2: ok
http://www.abc.de/kor/home/index.html
http://www.abc.de/kor/home/folder/content.html
 "index.html" includes: <div w3-include-html="folder/content.html"></div> 

3: not working
http://www.abc.de/kor/home/index.html
http://www.abc.de/kor/folder/content.html
 "index.html" includes: <div w3-include-html="../folder/content.html"></div>

4: not working
http://www.abc.de/kor/home/index.html
http://www.abc.de/kor/content.html
 "index.html" includes: <div w3-include-html="../content.html"></div>

 

Edited by OliSig
adding one more structure
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...