table-data macro not compatible with table macro
Is it possible to use the table-data macro with other table formats other then the standard confluence table? I would prefer to use the {table} macro such that I can have more style options.
Here is my example:
{style}
td.myclass {
color:#003366;
background-color:#f0f0f0;
text-transform:uppercase;
font-weight:bold;
}
{style}
h2. Colors
{center}
{table-data:Colors}
{table:border=1}
{table-row:width=80%}
{table-cell:width=40%|valign=center|class=myclass} Color Name {table-cell}
{table-row}
{table-row:width=80%}
{table-cell:width=40%|valign=center} {list-data:Color}
{list-option:Red}Red{list-option}
{list-option:Yellow}Yellow{list-option}
{list-option:Blue}Blue{list-option}
{list-option:Green}Green{list-option}
{list-data} {table-cell}
{table-row}
{table}
{table-data}
{center}
Here is my example:
{style}
td.myclass {
color:#003366;
background-color:#f0f0f0;
text-transform:uppercase;
font-weight:bold;
}
{style}
h2. Colors
{center}
{table-data:Colors}
{table:border=1}
{table-row:width=80%}
{table-cell:width=40%|valign=center|class=myclass} Color Name {table-cell}
{table-row}
{table-row:width=80%}
{table-cell:width=40%|valign=center} {list-data:Color}
{list-option:Red}Red{list-option}
{list-option:Yellow}Yellow{list-option}
{list-option:Blue}Blue{list-option}
{list-option:Green}Green{list-option}
{list-data} {table-cell}
{table-row}
{table}
{table-data}
{center}
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The company marked this question as answered.
-
Inappropriate?Not directly - options like {table-row} and {table-cell} don't even exist, as you're no doubt aware. You can get some extra control by wrapping the {table-data} with a {div} and styling based on that. You can also put {div} or {span} values inside cells, although it's difficult to affect the whole cell contents (I believe you can basically do it by setting your padding/margin values to 0 for the table cells and the contents.
Something like this:
{style}
.myclass table th .mycolumn {
color:#003366;
background-color:#f0f0f0;
text-transform:uppercase;
font-weight:bold;
vertical-align: center;
}
.myclass table td .mycolumn {
vertical-align: center;
}
{style}
{div:class=myclass}
{table-data}
|| {span:class=mycolumn}Color Name{span} ||
| {span:class=mycolumn}{list-data:Color}
{list-option:Red}Red{list-option}
{list-option:Yellow}Yellow{list-option}
{list-option:Blue}Blue{list-option}
{list-option:Green}Green{list-option}
{list-data}{span} |
{table-data}
{div}
Not exactly what you were after, but hopefully usable. -
Inappropriate?You are correct. That is not exactly the answer I was looking for; however, I will give it a shot.
I greatly appreciate the rapid response to my question. I'll provide you with more feedback as I implement your suggstion.
Thanks,
Ronnie
I’m undecided
-
Inappropriate?I was able to get a very similar look and feel along the lines you suggested. The main difference is that I am doing an override of the default table css.
Here is my example
{style}
table.confluenceTable
{
border-width: 1px;
border-spacing: 2px;
border-style: outset;
border-color: #003366;
border-collapse: separate;
text-align: center;
vertical-align: top;
font-weight:bold;
}
table.confluenceTable th.confluenceTh, table.admin th, th.confluenceTh
{
border-width: 1px;
border-padding: 1px;
border-style: inset;
border-color: gray;
background-color: #f0f0f0;
text-transform:uppercase;
text-align: center;
}
table.confluenceTable th.confluenceTh, table.admin th, th.confluenceTh, td.confluenceTd, table.confluenceTable td.confluenceTd, table.admin td
{
border-width: 1px;
border-padding: 1px;
border-style: inset;
border-color: gray;
text-align: center;
}
{style}
{table-data:Colors}
|| Color Name ||
| {list-data:Color}
{list-option:Red}Red{list-option}
{list-option:Yellow}Yellow{list-option}
{list-option:Blue}Blue{list-option}
{list-option:Green}Green{list-option}
{list-data} |
Once again, thx for you help and suggestion. It helped me greatly in finding a solution.
-
Great!
Loading Profile...




EMPLOYEE