Welcome to TalkGraphics.com
Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 38
  1. #11
    Join Date
    Jun 2019
    Location
    Provence, France
    Posts
    57

    Default Re: Woods and Trees !

    Dear Acorn,

    Thanks for the help, I now have the english layer opening by default on every page.

    Sorry that I didn't get back yesterday but a motorist has demolished a telegraph pole about a hundred yards from the house ! No repair planned before monday but we are just about managing to get online with a very chilled 'Hotspot' on my phone.

    Two, at least, things which I don't quite follow.... I have not found a, 'Repeat on all pages' option. in the Web properties Link box.

    How do I pass a 'language flag between page links to ensure that the next page continues in the same language' ?

    Sorry for being so dim !

    Take care

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

    Default Re: Woods and Trees !

    zapatak, the 'Repeat on all pages' option is select the two flags then Arrange > Repeating Object > Repeat on all pages.

    How do I pass a 'language flag between page links to ensure that the next page continues in the same language' ? - I need to work that out. It would be a case of including the window.location.search part to any link as "?lang=french" or "?lang=english" with some JavaScript to work with what it finds.

    I have no guarantees this will work and I will report back on my progress.

    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. #13
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,813

    Info Re: Woods and Trees !

    zapatak, I have a working solution for you.

    It requires explanation:
    • Modern browsers have the capability of sessionStorage. This allows persistence across a website's pages where what is set in one page is "known" across all the others. When you close the browser, the session end as does the persisting term and its value.
      • I set up a term of 'lang' and told it it could be 'french' or 'english'.
      • If you change all references of sessionStorage to localStorage. If you did this even when the browser is closed, the term is kept and remember.

    • I have included a repeating object, a yellow box, with Link -popup: close "French" "English".
      • This has to exist on each page but should be hidden (off-page seems to work).
      • This ensure the pop-up Layers, French and English are properly identified as pop-ups.
      • You may create the layers in different positions in your Page & Layer gallery.
        • Keep them adjacent and consistent across pages.
        • In Preview, hover over the box (which is why I set my file up so the yellow box is on the page) and look at the browser Status Line.
        • I see - javascript:xr_ppc(%27xr_xp4%27);xr_ppc(%27xr_xp5%27); - this tells me the French layer is number 4 (counting up from zero) & the English layer is number 5. xr_ppc means close.

    • The country flag buttons need to use this approach so the sessionStorage term can be set.
      • Union Jack - javascript: xr_ppo("xr_xp5"); xr_ppc("xr_xp4"); sessionStorage.setItem('lang', 'english'); - xr_ppo means open so we have open 5 (English), close 4 (French) and set lang to english.
      • French Tricolor - javascript: xr_ppo("xr_xp4"); xr_ppc("xr_xp5"); sessionStorage.setItem('lang', 'french'); - we have open 4 (French), close 5 (English) and set lang to french.

    • Checking lang across pages. You have most of the detail explained so the code in Website > HTML Body (code) is simply discovering the lang value and opening and closing layers to suit:
    • Code:
      <script>  setTimeout( function(){
          var lang = sessionStorage.getItem('lang');
          if (!lang) { lang = sessionStorage.setItem('lang', 'english'); xr_ppo('xr_xp5');}
          if (lang == 'english') {
              xr_ppo('xr_xp5');
              xr_ppc('xr_pc4');
          }
          if (lang == 'french') {
              xr_ppo('xr_xp4');
              xr_ppc('xr_pc5');
          }
        }, 200);
      </script>
      It needs a tidy but it works.

    Xara - Franglais - opens in English with Persistence.xar

    No Anchors are needed in this solution.

    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

  4. #14
    Join Date
    Jun 2019
    Location
    Provence, France
    Posts
    57

    Default Re: Woods and Trees !

    Hi Acorn,

    Thanks for your detailed solution, I will have a crack at it later today.

    Unfortunately our internet situation is going from bad to worse, absolutely no 'Hotspot' available yesterday and the telegraph pole repair reprogrammed to the 30th !

    Will keep you posted...

    many thanks for all your help

  5. #15
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,813

    Default Re: Woods and Trees !

    Quote Originally Posted by zapatak View Post
    Hi Acorn,
    Thanks for your detailed solution, I will have a crack at it later today.
    Unfortunately our internet situation is going from bad to worse, absolutely no 'Hotspot' available yesterday and the telegraph pole repair reprogrammed to the 30th !
    Will keep you posted...
    many thanks for all your help
    Thanks for the update. The solution does work off-line, locally.

    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

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

    Default Re: Woods and Trees !

    Great solution Acorn
    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. #17
    Join Date
    Dec 2006
    Location
    Melfort, Saskatchewan Canada
    Posts
    1,013

    Default Re: Woods and Trees !

    @acorn you never cease to amaze. How did you get so smart?
    Bill Wood
    Charity Web Design
    XARA Pro+. WD17, Designer 17. Premium packages.

  8. #18
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,813

    Default Re: Woods and Trees !

    Quote Originally Posted by bwood View Post
    @acorn you never cease to amaze. How did you get so smart?
    Bill, you just have to sweat away all the stupid.

    Hope you are back on-line with a proper connection.

    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

  9. #19
    Join Date
    Jun 2019
    Location
    Provence, France
    Posts
    57

    Default Re: Woods and Trees !

    Dear Acorn,

    let me apologise for not replying earlier but we have had eight days without internet ! In the current situation this is enough to drive one mad ! Right now we have a blistering 2mbps but this is a lot better than zilch !

    I must admit that your detailed instructions are a bit like too much information for me and I made no progress in that department.

    However I did more or less complete the small site but unfortunately there is one small question which I hope you have an answer for...

    I tried out the idea of making the site with responsive web design, it is more or less successful appart from your trick to make a language appear on start up which doesn't appear to work on the smaller smartphone model.

    Clicking the flag icon brings the text in but unlike in the desktop model I have text empty screens when starting on the mobile model.

    I enclose the XAR file so that you can see what is or isn't happening.

    You may enjoy the slideshows !

    Best wishes
    Attached Files Attached Files

  10. #20
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,813

    Default Re: Woods and Trees !

    I am sorry to say that I have been disappointed in that you seem to have ignored everything I proposed in https://www.talkgraphics.com/showthr...170#post624170.

    The flag buttons do not have the right code.
    The yellow Placeholder is nowhere.
    You decided to place the English and French layers between the MouseOff and MouseOver layers to start with and then mix in a popup1 layer elsewhere and to cap it then re-position the French and Layers above MouseOver.

    The code in the yellow Placeholder is trying to determine the layer number for French and English. My original was (4, 5); you set an impossible task of making it (4, 3) and thereafter (6, 5).

    To make things right I would have to re-order everything, a task that is properly yours.
    It is harsh but if you don't you will never know what has gone wrong when updating your site later on.

    In its present state I cannot guess if Variants will work.
    I am more than happy to work on it but on a corrected version.

    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

 

 

Tags for this Thread

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
  •