Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Difference between revisions of "Template:Blog"

From Roll20 Wiki

Jump to: navigation, search
m
(try make template dynamic based on input url, so old post/ links go to Web Archives, and it adjust the url depending on of you include or exclude the posts/ part of url)
Line 1: Line 1:
<includeonly>[https://blog.roll20.net/post/{{{1}}}]<sup style="font-size:0.6em;">(Blog)</sup></includeonly><noinclude>[[Category:Roll20 Site Link Templates]]{{documentation}}</noinclude>
+
<includeonly>{{#if:{{#pos:{{{1}}}|posts/|0}}|
 +
  [https://blog.roll20.net/posts/{{{1}}}]<sup style="font-size:0.6em;">(Blog)</sup>
 +
|
 +
  {{#switch:{{#expr:{{{1}}} matches /^[0-9]/}}|
 +
    1=[https://web.archive.org/*/https://blog.roll20.net/post/{{{1}}}]<sup style="font-size:0.6em;">(Blog, Archived)</sup>|
 +
    #default={{#if:{{#pos:{{{1}}}|post/|0}}|
 +
      [https://web.archive.org/*/https://blog.roll20.net/{{{1}}}]<sup style="font-size:0.6em;">(Blog, Archived)</sup>|
 +
      [https://blog.roll20.net/posts/{{{1}}}]<sup style="font-size:0.6em;">(Blog)</sup>
 +
    }}
 +
  }}
 +
}}</includeonly><noinclude>[[Category:Roll20 Site Link Templates]]{{documentation}}</noinclude>

Revision as of 09:45, 28 September 2024

[view] [edit] [history] [purge] Documentation icon Template documentation


For making links to the old Roll20 Blog posts that contain /post/ as part of the url, these links take you to a version of it on Web Archives, and these urls no longer works.

Template substitute automatically the https://blog.roll20.net/post/ part of the url, and then adds https://web.archive.org/web/0/ to the start, so the link takes you to the oldest version of the page on Web Archives.



Example:

Updated DL version 1.0 is live(Blog, Archived)

{{blog|640321601818198016/updated-dynamic-lighting-10-is-live Updated DL version 1.0 is live}}