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

Template Buttons to open Handouts

May 16 (3 years ago)

Edited May 16 (3 years ago)

I want to build a Default template t show a list of clickable buttons on chat and those buttons would open Handouts.

I want colored and rectangle buttons if possible.

How could I do this?

Thanks!

May 16 (3 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Hi, Guilherme!


Code for making buttons that open a handout:

  1. Create a handout with the names of all the handouts you want to link. Do this by using the [name of handout] method of autogenerating links.
  2. right click on this one at a time to copy the url
  3. create buttons in your roll template using the format for an API Command button: [button name](url)
    an example might look like this:
    [Campaign Guide](http://journal.roll20.net/handout/-LvYfkacryL3dTgM_bKj)

Information on Chat Menus


Styling a button.

The basic trick can be found here. It's a little more advanced, though.


May 16 (3 years ago)

Edited May 16 (3 years ago)

Thanks, Keithcurtis!

It worked, I'm able to link my hadouts on chat now, but is it possible to have that pink rectangular button instead a text line, it's barely visible.

This is not my macro, but it can explain what I mean. I want my buttons to be colored like those pink, but when I put a link on my button it turns into a text button.

Is it possible to make Handout Buttons like those?


May 16 (3 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Hmm. I know Roll20 treats url links differently from api links. You might be able to use that last tip link from the post I made to do some formatting, but honestly, I've never much messed with it. I tend to use the Stylus extension for things like that, which can do all kinds of formatting tricks, but only for the machine the style is installed on.

You might want to check out the ScriptCards API. I believe it allows for all kinds of formatting. Again, it's not an API I use, so I can't help much there.

Hi, Keithcurtis! I'm sorry if I delayed about giving you an answer!

With your help I did it! I got my rectangle button on a template! I'm just starting, but I'm excited!

I'm able to change its color and size. It opens my handouts when clicked and I can put as many buttons as I need.

This is my actual macro:

&{template:default}{{name=Consulta de Regras}}{{=[SUMÁRIO](http://journal.roll20.net/handout/-MQDC3nDOuJ8n3j9ICtr" style="color:white;font-size:20px;line-height:40px;background-color:green;padding:5px)}}

And this is my response on chat:


The HTML Styles in Chat link you sent me was very helpful.
Thanks again!