所有页面nuxeo中更改徽标的贡献

时间:2015-06-05 10:43:47

标签: interface customization nuxeo

我想更改我的nuxeo应用程序徽标。我已经阅读了如何更改登录页面以及它的工作方式,但现在我想更改所有页面的徽标,但我找不到任何有关如何执行此操作的教程。 这是我到目前为止所尝试的内容:

protected void ExportToExcel1(object sender, EventArgs e)
{
   Response.Clear();
   Response.Buffer = true;
   Response.AddHeader("content-disposition", "attachment;filename=GridViewExport.xls");
   Response.Charset = "";
   Response.ContentType = "application/vnd.ms-excel";
   using (StringWriter sw = new StringWriter())
   {
       HtmlTextWriter hw = new HtmlTextWriter(sw);

       //To Export all pages
       GridView1.AllowPaging = false;
       bindgrid();

       GridView1.HeaderRow.BackColor = Color.White;

       foreach (TableCell cell in GridView1.HeaderRow.Cells)
       {
           cell.BackColor = GridView1.HeaderStyle.BackColor;
       }
       foreach (GridViewRow row in GridView1.Rows)
       {
           row.BackColor = Color.White;
           foreach (TableCell cell in row.Cells)
           {
               if (row.RowIndex % 2 == 0)
               {
                   cell.BackColor = GridView1.AlternatingRowStyle.BackColor;
               }
               else
               {
                   cell.BackColor = GridView1.RowStyle.BackColor;
               }
               cell.CssClass = "textmode";
           }
       }

       GridView1.RenderControl(hw);

       //style to format numbers to string
       string style = @"<style> .textmode { } </style>";
       Response.Write(style);
       Response.Output.Write(sw.ToString());
       Response.Flush();
       Response.End();
   }
}

1 个答案:

答案 0 :(得分:0)

你在登录界面获得了它。对于其他页面,请查看Logback组件及其org.nuxeo.theme.styling.service扩展点。

您需要这样的XML贡献:

<extension target="org.nuxeo.theme.styling.service" point="flavors">
  <flavor name="myCompanyFlavor" extends="default">
    <logo>
      <path>/img/logo12.png</path>
      <previewPath>/img/logo12.png</previewPath>
      <width></width>
      <height></height>
      <title>MyCompany</title>
    </logo>
  </flavor>
</extension>