Welcome to TalkGraphics.com
Results 1 to 10 of 16

Thread: copyright 2020

Hybrid View

  1. #1
    Join Date
    May 2002
    Location
    Canada
    Posts
    3,339

    Default copyright 2020

    Gang, how can we have the year of the copyright notice on the footer automatically change to the year, same goes with the year anywhere on the pages.

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

    Default Re: copyright 2020

    Quote Originally Posted by behzad View Post
    Gang, how can we have the year of the copyright notice on the footer automatically change to the year, same goes with the year anywhere on the pages.
    I coded this for someone a time back onTG. Personally, I would now use smart fields as CopyrightDate and change in one place yearly.

    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
    Join Date
    May 2002
    Location
    Canada
    Posts
    3,339

    Default Re: copyright 2020

    Oh I like smart stuff Thanks.

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

    Default Re: copyright 2020

    Here's a JavaScript example. Not sure if it's overkill though.

    @ Acorn: How to I assign an ID to a text field within Xara?
    Attached Files Attached Files
    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

  5. #5
    Join Date
    May 2002
    Location
    Canada
    Posts
    3,339

    Default Re: copyright 2020

    Nice job Egg. Thanks to both of you.

  6. #6
    Join Date
    Oct 2010
    Location
    South Africa
    Posts
    877

    Default Re: copyright 2020

    Repeating object?

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

    Info Re: copyright 2020

    Quote Originally Posted by Egg Bramhill View Post
    Here's a JavaScript example. Not sure if it's overkill though.
    @ Acorn: How to I assign an ID to a text field within Xara?
    Egg, my approach is "simpler".

    Create and format a long Text Column with boilerplate text (i.e., any words at all).
    Highlight with the Text Tool and add Names of htmlblocktext and an ID (your question) of 'copyright'.

    In a Placeholder or Page body add the code:
    Code:
    <script>
      var result = document.getElementById("copyright").innerHTML = "\u00A9 " + Date().substr(11, 4);
    </script>
    An earlier example is in https://www.talkgraphics.com/showthr...198#post617198.

    The advantage is all the formatting is set up within Xara, with no extra coding.
    The disadvantage is it will fail in Supersites (HTML recognised only first ID instance0 so you have to write more code to instead present the value of the variable result...

    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

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

    Default Re: copyright 2020

    Yes, I really like that method.

    Re ID In my dotage I tried ID=copyright, ID = "copyright", "copyright" but never attempted copyright!
    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

 

 

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
  •