Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Feb 2009
    Location
    UK
    Posts
    472

    Question <html> and <head> placeholders

    Hi

    This is a question for Covoxer I imagine...

    I'm experimenting with the <head> and <html> tags and would like to clarify their exact usage.

    Please see the attached file. I've created 3 <head> and 3 <html> placeholders. Export the page and open up the html in a text editor.

    The <head> placeholders appear in the <HEAD> section as expected but not in the order I would have assumed, given their placement on the design board.

    The <html> placeholders appear in the <HEAD> section and not in the <BODY> as I thought they would and again they are not in the order I would have expected.

    Cheers

  2. #2
    Join Date
    Feb 2009
    Location
    UK
    Posts
    472

    Default Re: <html> and <head> placeholders

    Attaching the file might help
    Attached Files Attached Files

  3. #3

    Default Re: <html> and <head> placeholders

    Give objects the name <html> rather than text.
    In your example, if you group the page text <html 1> and then name it <HTML> the code in the Replace with HTML area will appear at the top of the page as required.

  4. #4
    Join Date
    Feb 2009
    Location
    UK
    Posts
    472

    Default Re: <html> and <head> placeholders

    Hi Sledger

    Thanks for your reply but I'm afraid that doesn't tally with my experience of XWD5 and 6 (assuming I've not misunderstood you!).

    As far as I can tell having the placeholders as text or an object makes no difference to how Xara treats them - a placeholder is a placeholder whatever it is and if you specify it is to be replaced by HTML then it will be.

    This can be demonstrated by my original file - these are text placeholders (named <head> and <html> respectively) and they do correctly get replaced as HTML. But there are 2 issues here:

    1) The order of the placeholder's HTML in the output file does not reflect the originating placeholder's position on screen and this is very important - you have to be able to control the order they output.

    2) The placeholders named <html> also appear in the <HEAD> portion of the HTML file. Surely these should be in the <BODY> section.

    I tried creating placeholders as objects (rectangles) as you suggested but I had the same issue as above, namely the output HTML did not reflect the position of the placeholders.

    Sorry for the long reply!

  5. #5

    Default Re: <html> and <head> placeholders

    Quote Originally Posted by gpholman View Post
    2) The placeholders named <html> also appear in the <HEAD> portion of the HTML file. Surely these should be in the <BODY> section.
    No, the <HTML> name was designed to place code at the very beginning of the output, in other words at the TOP of the page (for server side scripts), neither in the head section or body section.
    This name feature is new to WD6.

  6. #6
    Join Date
    Feb 2009
    Location
    UK
    Posts
    472

    Default Re: <html> and <head> placeholders

    Ok, well it's not doing that for me either.

  7. #7

    Default Re: <html> and <head> placeholders

    As mentioned earlier, if you group the text object that you are using as the placeholder, it does work.

  8. #8
    Join Date
    May 2009
    Location
    Germany
    Posts
    145

    Default Re: <html> and <head> placeholders

    Hi,
    Quote Originally Posted by sledger View Post
    As mentioned earlier, if you group the text object that you are using as the placeholder, it does work.
    you must not group the text object. I think there is a little bug with the <html> function.
    If you use gpholman's example, you see comment's like <!--HTML 2--> in the html-placeholders with the name <html>. After export or preview all html-code is inserted in the head section. If you put a space between "<!--" and the rest of the comment, the html-code is inserted at the very beginning of the exported html. If you now delete the inserted space (not with the undo function) and export again the html-code is inserted at the very beginning and all is ok the comment is <!--HTML 2--> which not worked with the first step .

    Maybe this is fixed if you create the project with the XWD6 6.0.0. 12008. If i create a project from scratch i don't have this problem, but with gpholman's example i see the problem.

    Sebastian

    P.S. it's difficult to explain the problem because my english is bad
    Last edited by Sebastian; 01 April 2010 at 09:57 PM.

  9. #9

    Default Re: <html> and <head> placeholders

    Quote Originally Posted by Sebastian View Post
    Hi,
    you must not group the text object. I think there is a little bug with the <html> function.
    No I don't think so.
    Grouping the text object forces Xara to ignore it as actual text. You can just as easily make the placeholder a small rectangle. Which I personally find far more usefull (along with a text label like the tweaks to make things easy to identify on the page, but this is also grouped text with the rectangle)

    I think the only reason gpholman used text on the page is because he was mistaken about the purpose of the <HTML> naming thinking it could be used in a way to output HTML code in the body area at the exact same line position as placed on the page in Web Designer.

  10. #10
    Join Date
    May 2009
    Location
    Germany
    Posts
    145

    Default Re: <html> and <head> placeholders

    Hi Sledger,
    please try it, use gpholman's example and insert only one space after the "<!--" and you will see it is working.

 

 

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
  •