Zum Inhalt springen

Copyright mit aktueller Jahreszahl

Erstellt am 23. Dezember 2005 · 1 Antwort · letzte Antwort am 23. Dezember 2005

Tags: Tipp

einpraegsam.​net ·

Ist zwar nichts besonderes aber wer gerne eine dynamische Jahreszahl im Copyright haben will:

page.10.marks.copy = COA
page.10.marks.copy.10 = HTML
page.10.marks.copy.10.value =  © 2000-
page.10.marks.copy.20 = TEXT
page.10.marks.copy.20.data = date:U
page.10.marks.copy.20.strftime = %Y 
page.10.marks.copy.30 = HTML
page.10.marks.copy.30.value = <a href="test.de">bla</a>

10 ist der Text vor der Jahreszahl
20 ist die Jahreszahl
und 30 der Text danach

Weihnachtsgrüße aus Nürnberg

FalkWalter ·

Hallo wunschtacho,

versuchs mal damit, die Konstanten kannst Du natürlich auch gerne hardcoden:

#Builds copyright remark with current date
# Needed Constants:
# - yearWebSiteCreation = int (Year of Web site creation)
# - copyrightOwner = string (Copyright owner of Web Site)

page.10.marks.copy {
10 = HTML
10.value = copy {$yearWebSiteCreation} #"&....;" um die HTML-Entity
20 = TEXT
20.data = date:Y
30 = HTML
30.value = nbsp #"&....;" um die HTML-Entity
40 = TEXT
40.value = {$copyrightOwner_lang}
}

Grüßle
Falk