Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack

Documentation

Page tree
Skip to end of metadata
Go to start of metadata

 

The above link is called a "Gutter" in OpenMRS. So as a module developer if you are looking to add a new Gutter when your module gets installed under OpenMRS, here are the steps you will need to follow.

  1. Add a gutter extension point in your OMOD/src/main/resources/config.xml file
    <extension>
        <point>org.openmrs.gutter.tools</point>
        <class>org.openmrs.module.MODULE_NAME.extension.html.GutterListExt</class>
    </extension>

2. Then add new class into  OMOD/src/main/java/org.openmrs.module.MODULE_NAME.extension.html/

package org.openmrs.module.MODULE_NAME.extension.html;

import org.openmrs.module.web.extension.LinkExt;

public class GutterListExt extends LinkExt {

    String urlg = "";
    String label = "";

    public String getLabel() {
        label = "LABEL_NAME";
        return this.label;
    }

    public String getUrl() {
        urlg = "PATH_TO";
        return this.urlg;
    }

    /**
     * Returns the required privilege in order to see this section. Can be a
     * comma delimited list of privileges. If the default empty string is
     * returned, only an authenticated user is required
     *
     * @return Privilege string
     */
    public String getRequiredPrivilege() {
        return "";
    }

}

 

Thats all.

Link: https://bitbucket.org/ehs/addgutteritem

 

  • No labels