Development Guide

Example - First Guide

Let's create our own guide for our extension.

First we are going to create our Guide class and specify in what resorce file we have our HTML code.

guide.ExampleGuide
public class ExampleGuide extends Guide {

  @Override
  public String getHtml() {
    return loadHtmlResource("/html/ExampleGuide.html");
  }

  @Override
  public String getTitle() {
    return "Example Guide";
  }
}

Now we can create our HTML file resource.

html.ExampleGuide
<p>Welcome to example guide!</p>
<p><strong>Example Link</strong>: <a href="" onclick="petep.openLink('http://example.com/');return false;">CLICK HERE</a></p>

And finally, we can register the Guide inside our PetepExtension.initGui() method by adding the following line to it.

petep.Extension: public void initGui(GuiHelper helper)
helper.registerGuide(new ExampleGuide());

That's it! After deploying the extension, we will be able to see the guide in application Guide.

Získejte registraci domén s tld .online, .space, .store, .tech zdarma!
Stačí si k jedné z těchto domén vybrat hosting Plus nebo Mega a registraci domény od nás dostanete za 0 Kč!
Objednat