## Please edit system and help pages ONLY in the moinmaster wiki! For more ## information, please see MoinMaster:MoinPagesEditorGroup. ##master-page:Unknown-Page ##master-date:Unknown-Date #acl MoinPagesEditorGroup:read,write,delete,revert All:read #format wiki #language en == Table Markup == To create a table, you start and end a line using the table marker "{{{||}}}". Between those start and end markers, you can create any number of cells by separating them with "{{{||}}}". To get a centered cell that spans several columns, you start that cell with more than one cell marker. Adjacent lines of the same indent level containing table markup are combined into one table. For more information on the possible markup, see HelpOnEditing. === Table Attributes === Apart from the option to repeat cell markers to get columns spanning several other columns, you can directly set many HTML table attributes. Any attributes have to be placed between angle brackets {{{<...>}}} directly after the cell marker. The wiki-like markup has the following options: * {{{<-2>}}}: colspan * {{{<|2>}}}: rowspan * {{{}}} will put that style info into cell (td) html * {{{}}} will put that style info into row (tr) html * {{{}}} will put that style info into table (table) html * {{{}}} will put that CSS class into cell (td) html * {{{}}} will put that CSS class into row (tr) html * {{{}}} will put that class into table (table) html * {{{}}} will put that CSS id into cell (td) html The style stuff is ''all you need'' for styling your tables. Just use CSS formatted style there and it will be inlined in the generated HTML tag. Alternatively, the admin and the user (the admin in the theme file, the user via <> can extend moin's CSS by his own definitions, so users can refer to them using class or id. You can use several options at the same time by writing them one after the other within the same angle brackets (e.g. {{{}}} on the first cell, to set both the table-wide style and the first-row style). We still support the old table markup, but generate the effect by appending additional values to the `style` parameter: * {{{<50%>}}}: cell width (will append `width: 50%;` to style) * {{{}}}: does the same * {{{}}}: set table width to 100% (only valid in first table row) * {{{<(>}}}: left aligned (will append `text-align: left;` to style) * {{{<:>}}}: centered (will append `text-align: center;` to style) * {{{<)>}}}: right aligned (will append `text-align: right;` to style) * {{{<^>}}}: aligned to top (will append `vertical-align: top;` to style) * {{{}}}: aligned to bottom (will append `vertical-align: bottom;` to style) * {{{<#XXXXXX>}}}: background color (will append `background-color: #XXXXXX;` to style) * {{{}}} does the same * {{{}}} set row background color (only valid in first cell) * {{{}}} set table background color If you use several conflicting options like {{{<(:)>}}}, the last option wins. There is no explicit option for vertical centering (''middle''), since that is always the default. === Example === {{{ NEW STYLE: General table layout and HTML like options:: ||||||'''Heading'''|| ||cell 1||cell2||cell 3|| || spanning rows|||| spanning 2 columns|| ||cell2||cell 3|| Cell width:: || narrow || wide || Spanning rows and columns:: ||<|2> 2 rows || row 1 || || row 2 || ||<-2> row 3 over 2 columns || Alignment:: ||left || top || bottom || || centered || || right || Fonts:: || normal || bold || red || boldred || Colors:: || red || green || blue || OLD STYLE: General table layout and HTML like options:: ||||||'''Heading'''|| ||cell 1||cell2||cell 3|| || spanning rows|||| spanning 2 columns|| ||cell2||cell 3|| Cell width:: || narrow ||<:99%> wide || Spanning rows and columns:: ||<|2> 2 rows || row 1 || || row 2 || ||<-2> row 3 over 2 columns || Alignment:: ||<(> left ||<^|3> top || bottom || ||<:> centered || ||<)> right || Colors:: ||<#FF8080> red ||<#80FF80> green ||<#8080FF> blue || Line breaks within cells:: || line 1[[BR]]line 2|| }}} === Display === NEW STYLE: General table layout and HTML like options:: ||||||'''Heading'''|| ||cell 1||cell2||cell 3|| || spanning rows|||| spanning 2 columns|| ||cell2||cell 3|| Cell width:: || narrow || wide || Spanning rows and columns:: ||<|2> 2 rows || row 1 || || row 2 || ||<-2> row 3 over 2 columns || Alignment:: ||left || top || bottom || || centered || || right || Fonts:: || normal || bold || red || boldred || Colors:: || red || green || blue || OLD STYLE: General table layout and HTML like options:: ||||||'''Heading'''|| ||cell 1||cell2||cell 3|| || spanning rows|||| spanning 2 columns|| ||cell2||cell 3|| Cell width:: || narrow ||<:99%> wide || Spanning rows and columns:: ||<|2> 2 rows || row 1 || || row 2 || ||<-2> row 3 over 2 columns || Alignment:: ||<(> left ||<^|3> top || bottom || ||<:> centered || ||<)> right || Colors:: ||<#FF8080> red ||<#80FF80> green ||<#8080FF> blue || Line breaks within cells:: || line 1<
>line 2|| === Insert Table Data from other sources === * comma separated values: see [[HelpOnParsers#csvparser]] * include wiki pages: see [[HelpOnMacros/Include|Include]] === Bulleted lists and other complex content within cells === {{attachment:MiniPage.png}} * see [[MoinMoin:MacroMarket/MiniPage|MiniPage macro]]