code: protected void printMacroValue(String macro) throws IOException {
  
          if (macro.startsWith(KEY_CMS)) {
              Object result = getMacroBeanValue(m_contextBean, macro.substring(KEY_CMS.length()));
              if (result != null) {
                  m_context.getOut().print(result);
              }
          } else if (macro.startsWith(KEY_ELEMENT)) {
              Object result = getMacroBeanValue(m_contextBean.getElement(), macro.substring(KEY_ELEMENT.length()));
              if (result != null) {
                  m_context.getOut().print(result);
              }
          } else if (macro.startsWith(KEY_PARENT)) {
              Object result = getMacroBeanValue(
                  m_contextBean.getParentElement(m_element),
                  macro.substring(KEY_PARENT.length()));
              if (result != null) {
                  m_context.getOut().print(result);
              }
          } else if (macro.startsWith(KEY_SETTINGS)) {
              String settingValue = m_element.getSettings().get(macro.substring(KEY_SETTINGS.length()));
              if (settingValue != null) {
                  m_context.getOut().print(settingValue);
              }
          } else {
  
              I_CmsFormatterBean formatter = getFormatterForMacro(macro);
              if (formatter != null) {
                  try {
                      CmsJspTagDisplay.displayAction(
                          CmsContainerElementBean.cloneWithFormatter(m_element, formatter.getJspStructureId()),
                          formatter,
                          m_context,
                          m_request,
                          m_response);
                  } catch (Exception e) {
                      LOG.error("Failed to display formatted content.", e);
                  }
              }
          }
      }
docs: Prints the macro value to the output stream.<p>
  
  @param macro the macro string
  
  @throws IOException in case writing to the page context output stream fails