Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Jakob's Better Default Rolltemplate nor working anymore

Hi, I had in my sheet, the Jakob's Better Default Rolltemplate as per the wiki.   But with the Character Sheet improvement, my sheet stop working.  I removed I instance of sheet-, and it started to work again (mostly).  But the Rolltemplate is not.  the Sheet- was removed, and its not working.  Tried to put it back (copy & pasted from wiki) and still not working (with the sheet-).  I really don't know why its not working since it was before... and its a simple rolltempate-custom... macro: &{template:default} work, but not &{template:custom} HTML: <!--- ROLL TEMPLATES --> < rolltemplate   class = "rolltemplate-custom" >      < div   class = "container color-{{color}}" >        < div   class = "header" >         {{#title}} < div   class = "title" > {{title}} </ div > {{/title}}         {{#subtitle}} < div   class = "subtitle" > {{subtitle}} </ div > {{/subtitle}}         {{#subtitle2}} < div   class = "subtitle2" > {{subtitle2}} </ div > {{/subtitle2}}        </ div >        < div   class = "content" >         {{#allprops() title subtitle subtitle2 desc color}}          < div   class = "key" > {{key}} </ div >          < div   class = "value" > {{value}} </ div >         {{/allprops() title subtitle desc color}}         {{#desc}} < div   class = "desc" > {{desc}} </ div > {{/desc}}        </ div >      </ div >    </ rolltemplate > CSS: /*============== ROLL TEMPLATE ==================*/ /* Smaller margins - remove these if you want the huge default left margin */ .rolltemplate-custom  {      margin-left :  -37px ;   }    .withoutavatars   .rolltemplate-custom  {      margin-left :  -7px ;   }       .rolltemplate-custom   .container  {      border :  1px   solid ;      /* by default, the border is the same color as the header. You can change this here, e.g. to black */      border-color :  var ( --header-bg-color );   }       /* Header formatting - title and subtitle */    .rolltemplate-custom   .header  {      background-color :  var ( --header-bg-color );      /* change text-align to center to center the header text */      text-align :  left ;      color :  var ( --header-text-color );      padding :  5px ;   }    .rolltemplate-custom   .title  {      font-size : 1.1em ;   }    .rolltemplate-custom   .subtitle  {      font-size : .9em ;   }    .rolltemplate-custom   .subtitle2  {      font-size : .9em ;   }       /* example colors */    .rolltemplate-custom   .container  {      /* this is the default color */      --header-bg-color :  rgba ( 112 , 32 , 130 , 1 );      --header-text-color :  #FFF ;   }    .rolltemplate-custom   .container.color-red  {      --header-bg-color :  #F00 ;   }    .rolltemplate-custom   .container.color-green  {      --header-bg-color :  #0F0 ;      --header-text-color :  #000 ;   }       /* Allprops part */    .rolltemplate-custom   .content  {      display :  grid ;      background :  #FFF ;      /* Header formatting - modify the column layout below */      grid-template-columns :  auto   auto ;      /* Line height to match default roll template */      line-height : 1.4em ;   }    .rolltemplate-custom   .content  >  div  {      padding :  5px ;   }       /* Left column */    .rolltemplate-custom   .content   .key  {      font-weight :  bold ;      padding-right :  10px ;      text-align :  right ;   }       /* Empty rule, use this if you want to change the right column    .rolltemplate-custom .value {   }   */       /* Make even-numbered rows grey */    .rolltemplate-custom   .content   :nth-child ( 4n+3 ),    .rolltemplate-custom   .content   :nth-child ( 4n ) {      background : #EEE ;   }       /* Description field */    .rolltemplate-custom   .desc  {      grid-column : span  2 ;      padding :  5px ;      text-align :  center ;   } MACRO: < button   type = "roll"   class = "fireweapon"   value = "&{template:custom} {{title=***@{weapon-name}***}} {{subtitle=@{character_name}}} {{subtitle2= Position: @{weapon-loc}}} {{**Margin Attack** = [[2d6 - 8 + @{gunnery-score} + ?{Conditional Modifiers|0}]] Success }} {{**Shots/Missiles** = @{weapon-damagev-Shots}}} {{**Damage** = @{weapon-damagev}}} " > Fire </ button > Any help?
1617311109

Edited 1617311131
Kraynic
Pro
Sheet Author
I think you maybe ended up cutting a couple things in the add/removal of the sheet prefix that messed things up.  First of all, the change in character sheet sanitization does NOT apply to roll templates, so leave roll template code exactly as it was.  I tested this in with legacy sanitization checked and unchecked in a custom game, and it worked both ways.  I just copy/pasted the code from the wiki and added your subtitle2 line in. HTML: <rolltemplate class="sheet-rolltemplate-custom">   <div class="sheet-container sheet-color-{{color}}">     <div class="sheet-header">       {{#title}}<div class="sheet-title">{{title}}</div>{{/title}}       {{#subtitle}}<div class="sheet-subtitle">{{subtitle}}</div>{{/subtitle}}       {{#subtitle2}}<div class="sheet-subtitle2">{{subtitle2}}</div>{{/subtitle2}}     </div>     <div class="sheet-content">       {{#allprops() title subtitle subtitle2 desc color}}       <div class="sheet-key">{{key}}</div>       <div class="sheet-value">{{value}}</div>       {{/allprops() title subtitle subtitle2 desc color}}       {{#desc}}<div class="sheet-desc">{{desc}}</div>{{/desc}}     </div>   </div> </rolltemplate> CSS: /* Smaller margins - remove these if you want the huge default left margin */ .sheet-rolltemplate-custom { margin-left: -37px; } .withoutavatars .sheet-rolltemplate-custom { margin-left: -7px; } .sheet-rolltemplate-custom .sheet-container { border: 1px solid; /* by default, the border is the same color as the header. You can change this here, e.g. to black */ border-color: var(--header-bg-color); } /* Header formatting - title and subtitle */ .sheet-rolltemplate-custom .sheet-header { background-color: var(--header-bg-color); /* change text-align to center to center the header text */ text-align: left; color: var(--header-text-color); padding: 5px; } .sheet-rolltemplate-custom .sheet-title { font-size:1.1em; } .sheet-rolltemplate-custom .sheet-subtitle { font-size:.9em; } .sheet-rolltemplate-custom .sheet-subtitle2 { font-size:.9em; } /* example colors */ .sheet-rolltemplate-custom .sheet-container { /* this is the default color */ --header-bg-color: rgba(112,32,130,1); --header-text-color: #FFF; } .sheet-rolltemplate-custom .sheet-container.sheet-color-red { --header-bg-color: #F00; } .sheet-rolltemplate-custom .sheet-container.sheet-color-green { --header-bg-color: #0F0; --header-text-color: #000; } /* Allprops part */ .sheet-rolltemplate-custom .sheet-content { display: grid; background: #FFF; /* Header formatting - modify the column layout below */ grid-template-columns: auto auto; /* Line height to match default roll template */ line-height:1.4em; } .sheet-rolltemplate-custom .sheet-content > div { padding: 5px; } /* Left column */ .sheet-rolltemplate-custom .sheet-content .sheet-key { font-weight: bold; padding-right: 10px; text-align: right; } /* Empty rule, use this if you want to change the right column .sheet-rolltemplate-custom .sheet-value { } */ /* Make even-numbered rows grey */ .sheet-rolltemplate-custom .sheet-content :nth-child(4n+3), .sheet-rolltemplate-custom .sheet-content :nth-child(4n) { background:#EEE; } /* Description field */ .sheet-rolltemplate-custom .sheet-desc { grid-column: span 2; padding: 5px; text-align: center; } Test macro I used: &{template:custom} {{title=Title Test}} {{subtitle=Subtitle Test}} {{subtitle2=Subtitle 2 Test}} {{Test Roll=[[1d20]]}} {{Test Roll 2=[[2d6]]}} {{desc=Description Test}}
Wow THANK YOU!!!!  its working again!  Curious because i did tr by copy/paste from the wiki!!