|
|
|
@ -16,6 +16,7 @@ use crate::renderer::errors::RenderError;
|
|
|
|
|
use crate::renderer::errors::WalkError;
|
|
|
|
|
use crate::renderer::inline_partial_tree::extract_inline_partials;
|
|
|
|
|
use crate::renderer::inline_partial_tree::InlinePartialTreeElement;
|
|
|
|
|
use crate::renderer::parameters_context::ParametersContext;
|
|
|
|
|
use crate::renderer::tree_walking::walk_path;
|
|
|
|
|
use std::borrow::Borrow;
|
|
|
|
|
use std::collections::HashMap;
|
|
|
|
@ -165,12 +166,19 @@ impl<'a> DustRenderer<'a> {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
DustTag::DTSection(container) => {
|
|
|
|
|
//let injected_context = ParametersContext::new(breadcrumbs, &container.params);
|
|
|
|
|
let injected_context = ParametersContext::new(self, breadcrumbs, &container.params);
|
|
|
|
|
let val = walk_path(breadcrumbs, &container.path.keys)
|
|
|
|
|
.map(|ice| ice.into_context_element(self, breadcrumbs));
|
|
|
|
|
match val {
|
|
|
|
|
Err(WalkError::CantWalk) => {
|
|
|
|
|
// TODO
|
|
|
|
|
let new_breadcrumbs = self.new_breadcrumbs_section(
|
|
|
|
|
breadcrumbs,
|
|
|
|
|
None,
|
|
|
|
|
Some(&injected_context),
|
|
|
|
|
&container.explicit_context,
|
|
|
|
|
None,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
Ok(final_val) => {
|
|
|
|
|
// TODO
|
|
|
|
@ -348,6 +356,13 @@ impl<'a> DustRenderer<'a> {
|
|
|
|
|
}
|
|
|
|
|
final_filters
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn append_new_elements_onto_tree<'b>(
|
|
|
|
|
original_parent: Option<&'b BreadcrumbTree>,
|
|
|
|
|
new_elements: Vec<BreadcrumbTreeElement<'b>>,
|
|
|
|
|
) -> Option<BreadcrumbTree<'b>> {
|
|
|
|
|
todo!()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struct BlockContext<'a> {
|
|
|
|
|