Yes I can share the data. Please load Brea project from [1] and do: =========
| testUser | testUser := BreaMember new createTestUser. testUser html ========= [1] http://smalltalkhub.com/#!/~Offray/Brea You will see that the twitter portion of the row is showed, but without any actual data inside. You can also try this: ========= '{{#twitter}} <tr> <td class="mdl-data-table__cell--non-numeric"><b>Twitter</b></td> <td class="mdl-data-table__cell--non-numeric"> <a href="https://twitter.com/{{twitter}}">{{twitter}}</a></td> </tr> {{/twitter}}' asMustacheTemplate value: { #twitter -> '@offrayLC' } asDictionary ========= with the same behavior. I think that the proper output will be the row showed with the data inside filled. Let me know how can I help to debug this. Thanks, Offray On 29/05/17 09:26, Norbert Hartl wrote: > To clarify. If the object you inject has a value which either does not > contain the key twitter or it does container the key twitter but its value is > nil then the section won't be shown. > > '{{#twitter}} > <tr> > <td > class="mdl-data-table__cell--non-numeric"><b>Twitter</b></td> > <td class="mdl-data-table__cell--non-numeric"> > <a > href="https://twitter.com/{{twitter}}">{{twitter}}</a></td> > </tr> > {{/twitter}}' asMustacheTemplate value: { #twitter -> nil } asDictionary > > gives empty string in my case. > > Norbert > >> Am 29.05.2017 um 16:20 schrieb Norbert Hartl <[email protected]>: >> >> Can you show some data you are injecting? It should work as you expect it. >> >> Norbert >> >>> Am 29.05.2017 um 15:26 schrieb Offray Vladimir Luna Cárdenas >>> <[email protected]>: >>> >>> Hi, >>> >>> I'm using Mustache for a project to build a dynamic distributed web site >>> generator for public & open data, backed by Fossil and using Material >>> Design Lite. I have a template like this: >>> >>> ======== >>> >>> {{#twitter}} >>> <tr> >>> <td >>> class="mdl-data-table__cell--non-numeric"><b>Twitter</b></td> >>> <td class="mdl-data-table__cell--non-numeric"> >>> <a >>> href="https://twitter.com/{{twitter}}">{{twitter}}</a></td> >>> </tr> >>> {{/twitter}} >>> >>> ======== >>> >>> that is mean to show or hide a row in a table, depending on if Twitter >>> data for a profile is found in a user profile. When the profile doesn't >>> have twitter data, the row is hidden, as supposed, and when it has, the >>> row is shown, but without any actual twitter data. What I'm missing? >>> Should I use partials in this case and how? >>> >>> Thanks, >>> >>> Offray >>> >>> >>> >> > >
