Ho do i change "sectiontableentry" to a new class?

17 years 4 months ago #26473 by Switch
What would I do in this case, if I didn't want to edit my main template, but instead wanted to add new css, such as .roweven and .rowodd for alternating rows. The following code tells the mablog which id to chose, but I want it use use my new css attributes.

[code:1] if($mosConfig_hits) {
$return .= "<th>".$this->_writeSortByLink($pagingParams,"entries_","hits",_UE_ARTICLEHITS)."</th>";
}
$return .= "</tr>";
$i = 2;
foreach($items as $item) {
if (is_callable( array( $mainframe, "getItemid" ) ) ) {
$itemid = $mainframe->getItemid( $item->id );
} elseif (is_callable( "JApplicationHelper::getItemid" ) ) {
$itemid = JApplicationHelper::getItemid( $item->id );
} else {
$itemid = null;
}
$itemidtxt = $itemid ? "&amp;Itemid=" . (int) $itemid : "";
$i = ($i==1) ? 2 : 1;
$return .= "<tr class=\"sectiontableentry$i\"><td><a href=\"".$artURL.$item->id.$itemidtxt."\">".$item->title."</a></td>"
. "<td>".mosFormatDate($item->created)."</td>";
if($mosConfig_hits) $return.= "<td>".$item->hits."</td>\n";
$return .= "</tr>\n";
}[/code:1]

Does anyone knowhow to acheive this?

Please Log in to join the conversation.

17 years 4 months ago #26474 by Switch
Gosh I feel silly. To change sectiontable entry to another class, just change [code:1]class=\"sectiontableentry$i\[/code:1] to for example [code:1]class=\"row$i\[/code:1]

Now, i couldn't use .roweven and .row odd, I used .row1 and .row2

Simply create thse css attribute in your css, eg
[code:1].row1{
background: #E9EBF4;
color: #000000;
border-bottom:1px solid #EEEEEE;
}

.row2{
background: #FFFFFF;
color: #000000;
border-bottom:1px solid #EEEEEE;
}[/code:1]

Easy as pie!

Please Log in to join the conversation.

17 years 4 months ago #27053 by goofy001
I cheated, I just set both of them to the same background color. One day will actually change the class being used and stop being lazy :)

Please Log in to join the conversation.

17 years 2 months ago #29577 by bary
great post

Please Log in to join the conversation.

17 years 1 month ago #32875 by simon
Strange one here...

Has to do with the styling of the registration form..

Changed the styling of the td .delimiterCell bij adding this to my CSS

table#registrationTable .delimiterCell {
font-family:verdana;
font-weight:bold;
color:#999999;
font-size:1.0em;
padding-bottom:5px;
padding-top:10px;
}

Did the trick...
Did the same thing to the td . titleCell

table#registrationTable .titleCell {
font-family:verdana;
color:#999999;
font-size:1.0em;
padding-bottom:10px;
}

But is does not work..????

Please Log in to join the conversation.

17 years 3 weeks ago #34155 by PretenderMP
Replied by PretenderMP on topic Re:Ho do i change "sectiontableentry" to a new cla
my question is rather similar.. I just want the userlist to have the standard sectiontableentry1 and 2 css, but in the profile plugin I want other colours. It seems impossible to change. For instance the table with the user details has the sectiontableentry css, but I want different colour for that. I tried everything, including the $row thing, but without success.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.247 seconds

Facebook Twitter LinkedIn