1 anonymous Nov 11, 2008 14:16
3 lxsparks Nov 11, 2008 20:08
I'm targeting a widget within a sidebar container, so where would I add the <div> tag with out affecting the other widgets which I don't wish to style?
Extract of code from _sidebar include template based on the Nifty Corners design:-
...notes here...
<div id="sidebar">
<ul>
<?php
// ------------------------- "Sidebar" CONTAINER EMBEDDED HERE --------------------------
// Display container contents:
skin_container( NT_('Sidebar'), array(
// The following (optional) params will be used as defaults for widgets included in this container:
// This will enclose each widget in a block:
'block_start' => '<li class="widget">',
'block_end' => '</li>',
// This will enclose the title of each widget:
'block_title_start' => '<h2>',
'block_title_end' => '</h2>',
// If a widget displays a list, this will enclose that list:
'list_start' => '<ul>',
'list_end' => '</ul>',
// This will enclose each item in a list:
'item_start' => '<li>',
'item_end' => '</li>',
// This will enclose sub-lists in a list:
'group_start' => '<ul>',
'group_end' => '</ul>',
// This will enclose (foot)notes:
'notes_start' => '<div class="notes">',
'notes_end' => '</div>',
) );
// ----------------------------- END OF "Sidebar" CONTAINER -----------------------------
?>
</ul>
...code for b2evolution promotion here...
</div>
4 lxsparks Nov 11, 2008 20:37
Aha, it's come to me at last.
The original skin I've been using must have been designed for a previous version of b2evolution. I have changed the line:-
'block_start' Arrow '<li class="widget">',
to:-
'block_start' Arrow '<li class="$wi_class$">',
and hey presto each widget now has it's own class attached and now the definable class/id's appear :D
When you set widget class it doesn't replace the existing one. So if you set class "qwerty" for Blog title widget you'll get the following in skin