You can hide facets on the sidebar altogether. See this example: BEFORE: <td id="sidebar"> <div ex:role="facet" ex:height="15em" ex:expression=".date_released" ex:facetLabel="Date released"></div> <div ex:role="facet" ex:height="15em" ex:expression=".country"></div> <div ex:role="facet" ex:height="7em" ex:expression=".publisher" ex:facetLabel="Publisher"></div> <div ex:role="facet" ex:height="7em" ex:expression=".department" ex:facetLabel="Department"></div> <div ex:role="facet" ex:height="7em" ex:expression=".license" ex:facetLabel="License"></div> <div ex:role="facet" ex:height="7em" ex:expression=".author" ex:facetLabel="Author"></div> <h2>Search</h2> <div ex:role="facet" ex:facetclass="TextSearch"></div> </td>
AFTER: <td id="sidebar"> <div ex:role="facet" ex:height="7em" ex:expression=".license" ex:facetLabel="License"></div> <div ex:role="facet" ex:height="7em" ex:expression=".author" ex:facetLabel="Author"></div> <h2>Search</h2> <div ex:role="facet" ex:facetclass="TextSearch"></div> </td> I don't know how to make "if-exists" on the sidebar though. Post back if you find the string. Best, Daniel On 24 abr, 16:43, Ricardo Cabral <[email protected]> wrote: > Thanks Daniel. But your example applies for hiding missing properties > inside a view, but I wanted to hide a facet when none of the items > currently loaded have that property. It's silly to show facets with a > single selection "(missing this field)". > > On Apr 23, 9:39 am, dhinostroza <[email protected]> wrote:> Hi Ricardo, > > perhaps this snippet with two examples might help: > > <div ex:role="lens"> > > <div ex:if-exists=".publisher" class="year"><b>Publisher:</b> <span > > ex:content=".publisher"></span> </div> > > <div ex:if-exists=".date_released" class="year"><b>Date released:</ > > b> <span ex:content=".date_released"></span></div> > > > Best, > > Daniel > > > On 16 abr, 09:04, Ricardo Niederberger Cabral <[email protected]> > > wrote: > > > > Hi. How can I hide a facet if all items in my data miss a field? > > > > For example, > > > athttp://open.mflask.com/datasets?_v=submitted_by=http://ckan.net/ > > > you can see several facets whose fields are not present on the current > > > search results and it would make sense to hide them (Date released, > > > Publisher, ...). > > > > Is it possible? > > > > Thanks! -- You received this message because you are subscribed to the Google Groups "SIMILE Widgets" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/simile-widgets?hl=en.
