Child pages
  • Autoexport Templates
Skip to end of metadata
Go to start of metadata

Autoexport Templates.

(error) - This information is obsolete. We do not use Autoexport Templates or sites any more.

There are a few templates around that projects use for styling their Autoexported wikis. We'll try and gather a few templates here as examples that projects can just copy and paste to go.

Any project that would like to contribute their template to this page for use b y others please contact infrastructure@apache.org with a link to the code (or just say feel free to copy it from the confluence autoexport admin area.)

(warning) Remember that Confluence based autoexported 'websites' are being phased out and no new sites are allowed to use this method. Projects are welcome to continue to use Confluence as a 'Wiki'. The purpose of the 'Wiki' being exported is so that projects can refer to the exported URIs of the wiki to help reduce the load of the wiki application itself - just send people to do the viewing in the static version of the wiki (thumbs up)

This INFRA space is based on the Atlassian built-in 'Documentation Theme'. Ones Autoexported template is based on whatever your space theme uses, so try and grab a template that uses the same space theme as your own site.

Thanks go to the QPID project of which the exported INFRA space template has heavy influences.

Documentation Theme based templates.

  1. Site used: https://cwiki.apache.org/INFRA
#set($base = "http://cwiki.apache.org/INFRA")
#set($globalHelper = $action.getHelper())
#set($renderer = $globalHelper.getWikiStyleRenderer())
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <link type="text/css" rel="stylesheet" href="$stylesheet">
    <style type="text/css">
      .footer {
        background-image:      url('$confluenceUri/images/border/border_bottom.gif');
        background-repeat:     repeat-x;
        background-position:   left top;
        padding-top:           4px;
        color:                 #666;
        clear:                 both;
      }
     .left {
        padding-top: 5px;
	float : left;
        width : 25em;
      }
      .pagecontent {
         float: left;
         width: 70%;
      }
    </style>
    <script type="text/javascript" language="javascript">
      var hide = null;
      var show = null;
      var children = null;

      function init() {
        /* Search form initialization */
        var form = document.forms['search'];
        if (form != null) {
          form.elements['domains'].value = location.hostname;
          form.elements['sitesearch'].value = location.hostname;
        }

        /* Children initialization */
        hide = document.getElementById('hide');
        show = document.getElementById('show');
        children = document.all != null ?
                   document.all['children'] :
                   document.getElementById('children');
        if (children != null) {
          children.style.display = 'none';
          show.style.display = 'inline';
          hide.style.display = 'none';
        }
      }

      function showChildren() {
        children.style.display = 'block';
        show.style.display = 'none';
        hide.style.display = 'inline';
      }

      function hideChildren() {
        children.style.display = 'none';
        show.style.display = 'inline';
        hide.style.display = 'none';
      }
    </script>
    <title>Apache Infastructure - $page.title</title>
  </head>
  <body onload="init()">
    <table border="0" cellpadding="2" cellspacing="0" width="100%">
      <tr class="topBar">
        <td align="left" valign="middle" class="topBarDiv" align="left" nowrap>
          &nbsp;$autoexport.breadcrumbs($page)
        </td>
        <td align="right" valign="middle" nowrap>
          <form name="search" action="http://www.google.com/search" method="get">
            <input type="hidden" name="ie" value="UTF-8" />
            <input type="hidden" name="oe" value="UTF-8" />
            <input type="hidden" name="domains" value="" />
            <input type="hidden" name="sitesearch" value="" />
            <input type="text" name="q" maxlength="255" value="" />        
            <input type="submit" name="btnG" value="Google Search" />
          </form>
        </td>
      </tr> 
    </table>

    <div id="PageContent">
        <div class="pageheader" style="padding: 6px 0px 0px 0px;">
<div>
<table border="0" width="90%">
<tr>
<td align="left">
<a href="http://infrastructure.apache.org">
<img src="http://apache.org/images/feather-small.gif" height="61" width="203" border="0"></a>
</td>
<td>
</td>
<td align="right">Apache Software Foundation</td>
</tr>
</table>
</div>

      </div>

<!--


      <div class="pagesubheading" style="margin: 0px 10px 0px 10px;">
        #editReport()
      </div>
-->
#set($child = $pageManager.getPage($page.space.key,"Navigation"))
#set($content = $renderer.convertWikiToXHtml($child.toPageContext(), $child.content).trim())
#set($content = $content.replaceAll("^<[pP]>|</[pP]>$", "") )
        <div class="left">$content</div>

      <div class="pagecontent">
        <div class="wiki-content">
          $body
        </div>

<!--
        #if ($page.hasChildren())
          <div class="tabletitle">
            Children
            <span class="smalltext" id="show" style="display: inline;">
              <a href="javascript:showChildren()">Show Children</a></span>
            <span class="smalltext" id="hide" style="display: none;">
              <a href="javascript:hideChildren()">Hide Children</a></span>
          </div>
          <div class="greybox" id="children" style="display: none;">
            #set ($children = $page.children)
            #foreach ($child in $children)
              $autoexport.link($child)
              <span class="smalltext">($child.space.name)</span>
              <br>
            #end
          </div>
        #end
-->

      </div>

    <div class="footer">
      Apache Infrastructure    
      &nbsp;
      &copy; 2011 The Apache Software Foundation.
      &nbsp;
        (<a href="$confluenceUri/pages/editpage.action?pageId=$page.id">edit this page</a>)
      &nbsp;
            Generated by
      $autoexport.confluenceInfo
    </div>
  </body>
</html>
  • No labels