Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1

    Default How to specify the "initial layer" for a page?

    I thought I had this one solved, based on a post I made in 2013. How-to-specify-a-default-layer

    But I've run into problems trying to have one of a dozen layers come up as the default ... and then give way to another selection, based on the viewer's selection. I can make the layer display ... but it stays on the screen when other layers are selected. If I remove any special processing, the layer works fine, by itself. (Each layer is made up of text blocks that appear on top of a background image. My 2013 examples used images that overlaid one another ... so the entirety of the initial image was replaced.)

    I named a mypopup1 element and then placed these lines in the body of the page:
    <script type="text/javascript">
    xr_v1(document.getElementById('mypopup1').parentNo de.parentNode)
    </script>
    Searching here and with Google, I haven't been able to find a shred of reference to either a default or initial layer (other than for my 2013 post).

    Isn't there a more-or-less standard way to set one of the layers as an initial layer?


    Thanks in advance for any help.

  2. #2
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,823

    Info Re: How to specify the "initial layer" for a page?

    This is a variation of http://www.talkgraphics.com/showthre...619#post499619, using the popup feature that is an undocumented feature: http://www.talkgraphics.com/showthre...anced-features.

    My approach with an example - Load and Close Layers.xar:

    1. Name your Layers - single <Word> - so standard.
    2. Put an object on each layer - Name each as same single Layer <word> - lowercase. Click Add.
    3. Put script in Page body - so it loads last - <script type="text/javascript">xr_v1(document.getElementById('<word>' ).parentNode.parentNode)</script> Click Apply.
    4. Preview the page - check the <Word> Layer opens.
    5. Add a button for each Layer - Pop-up layer link to Layer <Word> - for each one, make its Settings, tick "Close pop-up automatically" Click OK and click Apply.

    Alternatively, to have a Close button:

    1. For each button for each Layer - make its Settings, untick "Close pop-up automatically" Click OK and click Apply.
    2. Change each Link for its "Link to Web..." to: popup: "<Word>" close "<Other Layer Word1>" "<Other Layer Word2>" "<Other layer Word3>"... Click Apply.

    My example file includes the latter so it's easier to experiment.
    On load, the Banner Layer opens and will not close until the Banner button is selected; it will then close if you click anywhere on the page. The shape has a Name of banner.
    On selecting the Discovery button, the Layer opens and will not close. It closes any Layer that was open. The shape has a Name of discovery.
    On selecting the Exploration button, the shape with a Name of exploration slides into view.

    The Head body code is opening banner but any of the other Names could be used.

    I personally would use the popup approach throughout as it has the finer control; it has some limited effects if you append (fade 4) to the Layer name.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  3. #3

    Default Re: How to specify the "initial layer" for a page?

    Thanks for the extensive explanation and examples.

    I've tried many combinations of the things you've suggested ... and I think I'm very close. But I can't get the initial layer to disappear when a "next" layer is activated. I've put together this example to show where I'm at with this:

    Message Test.xar

    I'll also mention that Layer 1 doesn't not appear as the default layer unless I make it visible before requesting to Preview the page. Given that there is html to specifically activate the message text, the non-display doesn't seem right.

    Would you kindly point out what I've left out? (BTW, I can't use a Close button on any layer. It wouldn't fit the usage "flow". Just click back and forth between the two icons to get the idea.)


    (Also, I'm using Pro X9, if that makes any difference for the method.)
    Last edited by Contours; 03 October 2016 at 04:45 PM.

  4. #4
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,823

    Default Re: How to specify the "initial layer" for a page?

    As you say "very close".

    I think the Naming of a text line is a problem due to the way Xara handles them.
    The solution - use a shape and colour it or hide it in the design.

    Layer 1 was not being published as you hid it.
    To get round this faux pas, I usually add another button to open the Layer - that way it always gets published, visible or hidden.
    You can hide this button in the same way or design it in.

    The button triggers should be:
    (My extra button): popup: "Layer 1" close "Layer 2" "Layer 3"
    (Monitor): popup: "Layer 2" close "Layer 1" "Layer 3"
    (Notepad): popup: "Layer 3" close "Layer 1" "Layer 2"

    Don't add Layers between MouseOff and MouseOver. Keep these two touching.

    The way I would have handled your example would be to not have a Layer 1 and put its text on MouseOff.
    For Layers 2 & 3, i would have added a soft-group of a box just big enough to cover to th MoueOff text in the same colour as the background.
    No code.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  5. #5

    Default Re: How to specify the "initial layer" for a page?

    Thanks for the clear explanation. What I'm hearing is that, in reality, there's not a Xara feature for displaying a default layer.

    big enough to cover to the MouseOff text
    I had that idea waiting in the wings. But my testing showed that, with the fade in/out method I use, the Mouse Off text momentarily fades back in and out of view.

    In my earlier years, we called this a "kludge" (long u). I'm not against getting the bottom line result by using such tricks. But I'm disappointed that Xara doesn't directly support such an obvious need.

    Some of the tricks you've shown in your example may come in handy, later. Indeed, I didn't know about the whole list of undocumented features.

    I'll have to continue to mull this one over.

    Thanks, again.

  6. #6
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,917

    Default Re: How to specify the "initial layer" for a page?

    Interesting problem. Have you thought of using a supersite? You could always load the supersite into a placeholder of a conventional site if required. If you don't want the home button, just clicking on the background takes you there. Example here


    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  7. #7

    Default Re: How to specify the "initial layer" for a page?

    Have you thought of using a supersite?
    Well, the short answer is "no". The longer answer is "I'm not familiar with supersites".

    But the real problem (for me) is that I'm close to wrapping up a 20-page site, with probably 50 layers sprinkled throughout. I thought I was close to really controlling the layers like I wanted. But since it hasn't panned out, I will have to step back a bit. I just can't get too far off track from what I've already done.

    Thanks for the idea.

  8. #8
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,917

    Default Re: How to specify the "initial layer" for a page?

    Yes, I can understand that. However you could try saving your site under another name. 'site-2.xar' for example. Then change the site to a supersite. It's quite simple. Then publish it to view.
    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  9. #9
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,823

    Default Re: How to specify the "initial layer" for a page?

    Clearly we don't see all of your work but don't get hung up on leveraging a technique that isn't standard while they may be other options.
    Open it up to other TGers and see what comes back.

    For instance, if you have a number of these icons, why do they need to be layered when you could make the text into a rollover effect just using MouseOff and MouseOver.
    As to the information, your Layer 1, that could be on MouseOff and simply have a fade in that covers or dims it.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  10. #10

    Default Re: How to specify the "initial layer" for a page?

    @Egg: Alas, I don't seem to have a supersite option in Pro X9. Now that I understand what it is, I'll keep it in mind as a future possibility. Thanks.

    @Acorn: I assure you, I haven't abandoned all hope on having a default layer come up and then fade upon the first visitor action. With header scripting and a dozen layer options, naming, etc., I'm just going to test for a while. Right now, I'm trying to figure if there's some what to have an automated "click" on a hidden button.

    Thanks for the encouragement. Any other ideas will be appreciated. Regarding the mouseover possibility, my layers do have text and graphics. Plus, the organization of elements into named layers is just "nice" (too bad it doesn't work! ... yet.)

 

 

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
  •