- 论坛徽章:
- 0
|
后续问题,不是所有view存在个性化数据,导致not found错误
Template::Context 补丁两处:
- # we first look in the BLOCKS hash for a BLOCK that may have
- # been imported from a template (via PROCESS)
- return $template
- if ($template = $self->{ BLOCKS }->{ $name });
- if(defined $self->{CONFIG} && defined $self->{CONFIG}->{REQUIRED_BLOCKS}){
- foreach(@{$self->{CONFIG}->{REQUIRED_BLOCKS}}){
- if($name eq $_){
- return {$_ => sub{}};
- }
- }
- }
复制代码
- elsif (ref $compiled) {
- $tmpout = (blessed($compiled)) ? $compiled->process($self) : "";
- }
复制代码
config.yml 参数增加一个:
- engines:
- template_toolkit:
- AUTO_RESET: 0
- REQUIRED_BLOCKS: [MyCss,MyJs,JsInit]
复制代码 |
|