Implement the size helper but it has a bug somewhere.
This commit is contained in:
parent
a6c22417e5
commit
44d54c86d2
@ -723,8 +723,21 @@ impl<'a> DustRenderer<'a> {
|
||||
}
|
||||
}
|
||||
DustTag::DTHelperSize(parameterized_block) => {
|
||||
//todo
|
||||
todo!()
|
||||
let param_map =
|
||||
ParametersContext::new(self, breadcrumbs, ¶meterized_block.params, None);
|
||||
let value = self.tap(breadcrumbs, ¶m_map, "key");
|
||||
let value_ce = value.as_ref().map(|maybe_ice| {
|
||||
maybe_ice
|
||||
.as_ref()
|
||||
.map(|ice| ice.get_context_element_reference())
|
||||
.map(|ce| ce.get_size())
|
||||
});
|
||||
match value_ce {
|
||||
None | Some(Err(_)) | Some(Ok(None)) => return Ok("".to_owned()),
|
||||
Some(Ok(Some(ce_size))) => {
|
||||
return ce_size.get_context_element_reference().render(&Vec::new())
|
||||
}
|
||||
}
|
||||
}
|
||||
DustTag::DTHelperContextDump(parameterized_block) => {
|
||||
//todo
|
||||
|
Loading…
Reference in New Issue
Block a user