Welcome to TalkGraphics.com
Results 1 to 6 of 6
  1. #1

    Default 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.
    jgt

  2. #2
    Join Date
    Jan 2006
    Location
    England (Amongst the green rolling hills of the East Midlands)
    Posts
    51

    Default 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.

  3. #3

    Default 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.
    1. In my includes folder I created Page-Links-Shower-Pan-Gurber.js which contains the code I posted in my initial post.
    2. For the placeholder code (HTML CODE (body)) I used <script type="text/javascript" src="includes/Page-Links-Shower-Pan-Gurber.js"> </script>
    3. 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.
    4. 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.
    jgt

  4. #4
    Join Date
    Apr 2010
    Location
    Kildare, Ireland
    Posts
    906

    Default 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

  5. #5
    Join Date
    Aug 2007
    Location
    Maghull UK
    Posts
    6,202

    Default 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
    Attached Files Attached Files
    JOHN -XaReg (FB) XaReg (DB - ignore prompt to register)
    Windows 10 [Anniversary] pro Intel Pentium CPU G630 @ 2.70Ghz RAM: 4 GB; 64-bit x64

  6. #6

    Default 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 View Post
    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!
    jgt

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •