XWD 7 what is best method to repeat HTML on some pages, e.g. how do I create an inclu
I know that I can repeat something on all pages and this I've done. Now I want to include the following on "some" of my pages:
<dl>
<dt>Gruber</dt>
<dd><a href="http://www.gruber-systems.com/products/molds/shower/1050.htm" target="_blank">Shower Pans 1050 Series</a></dd>
<dd><a href="http://www.gruber-systems.com/products/molds/shower/1051.htm" target="_blank">Shower Pans 1051 Series</a></dd>
<dd><a href="http://www.gruber-systems.com/products/molds/shower/1052.htm" target="_blank">Shower Pans 1052 Series</a></dd>
</dl>
I've found several sources that attempt to explain the procedure to include HTML from another file into a page but I cannot seem to understand what I'm reading (I cannot get it to work). On my current site I used PHP with an include, this worked great but with XWD I'm a bit lost. From what I've read it should be simple but it is not simple enough for me.
The reason I want to use the code as an include is that the links are subject to change and I don't want to hunt for the pages I included the links. If (as I currently do with the PHP include) I can use the include function within XWD I'd have the same function as I do now and make a change in one place (e.g. the file I'm including) and automatically everywhere the file is used the change would be reflected.
Re: XWD 7 what is best method to repeat HTML on some pages, e.g. how do I create an i
One method is outlined at the URL below...
http://webdesign.about.com/od/javasc...includehtm.htm
Then simply add a placeholder object that 'calls' the external file, on the pages where it is needed.
Re: XWD 7 what is best method to repeat HTML on some pages, e.g. how do I create an i
That was one of the sources I had looked at and tried. I just cannot get it to work. As I understand the JS file it will include either text or javascript, not HTML code. But I did try putting the HTML code in the JS file but it did not work for me. I very well may be doing something wrong.
- In my includes folder I created Page-Links-Shower-Pan-Gurber.js which contains the code I posted in my initial post.
- For the placeholder code (HTML CODE (body)) I used <script type="text/javascript" src="includes/Page-Links-Shower-Pan-Gurber.js"> </script>
- My page did not display the code in the file, I uploaded the web and tested. When I view the source of the page in the browser I can see the line of code that should pull the code from the JS file.
- I also tried using file with an extension of shtm and using <!--#include file="includes/Page-Links-Shower-Pan-Gurber.shtm" --> to pull the code in. This did not work for me, e.g. it did not display the text with links, it was just blank.
Re: XWD 7 what is best method to repeat HTML on some pages, e.g. how do I create an i
You should be able to carry on using a php include in a placeholder.
Code:
<?php include('includes_folder/Page-Links-Shower-Pan-Gurber.js'); ?>
Make sure your page extnesion is .php and not .htm or .html
1 Attachment(s)
Re: XWD 7 what is best method to repeat HTML on some pages, e.g. how do I create an i
This should do the job ... without js or php :)
Re: XWD 7 what is best method to repeat HTML on some pages, e.g. how do I create an i
Quote:
Originally Posted by
neodeist
This should do the job ... without js or php :)
AH SUCCESS!!!!! OH Joy!!!!!
I really like your idea of using a graphic image it make things MUCH more obvious when I view the page in XWD that I've got this include. Super..... Thanks again!