At the moment, widgets in TW5 have to generate at least one DOM element. It is this that leads to the confusing array of divs and spans in the HTML output. I'm increasingly thinking that this needs to be fixed, and giving some thought to the necessary refactoring.
Best wishes Jeremy On Fri, Sep 6, 2013 at 2:49 PM, David Johnston <[email protected]>wrote: > TW5 $view returns a span ... Is there a way to stop that happening when > nothing is found/returned by the $list it is within. > > Example: - > > <$list filter="[title{!!title}]" type="plain" itemClass="st"> > <$view field="testfield1"/><$view field="testfield2"/><$view > field="testfield3"/> > </$list> > > testfield1 is an empty field > testfield2 contains "content2" > testfield3 contains "content3" > > This returns > > <span></span> > <span>content2</span> > <span>content3</span> > > Which reasonably enough presents as > > content2content3 > > I am using CSS pseudo elements to add :content ::before and ::after to add > relevant commas etc. > > However the empty span at the beginning from testfield1 is throwing off my > CSS selectors :first-child, :nth-child. > > Is there a method to ensure NOTHING is returned by an empty view .. not > even a <span>? > > > > > > -- > You received this message because you are subscribed to the Google Groups > "TiddlyWiki" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/tiddlywiki. > For more options, visit https://groups.google.com/groups/opt_out. > -- Jeremy Ruston mailto:[email protected] -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/groups/opt_out.

