Most assets call processTemplate to do their template processing. Inside
of processTemplate, there is a call to $self->get which adds all the asset properties to the list of template variables. Sometimes they duplicate entries in the www_ method (like view). Sometimes they're not interesting, like templateId, but they're still valid template variables. I'm going to start a new template variable entry for each asset that will just contain those variables. Any www_ method calling processTemplate can then include them via ISA into their list of template variables.
This commit is contained in:
parent
4ed1f2f30e
commit
c867f9eadb
7 changed files with 139 additions and 32 deletions
|
|
@ -46,10 +46,15 @@ our $HELP = {
|
|||
},
|
||||
],
|
||||
},
|
||||
|
||||
'article template' => {
|
||||
title => '72',
|
||||
body => '73',
|
||||
isa => [
|
||||
{
|
||||
namespace => "Asset_Article",
|
||||
tag => "article asset template variables"
|
||||
},
|
||||
{
|
||||
namespace => "Asset_Template",
|
||||
tag => "template variables"
|
||||
|
|
@ -143,12 +148,38 @@ our $HELP = {
|
|||
}
|
||||
]
|
||||
},
|
||||
],
|
||||
related => [
|
||||
{
|
||||
tag => 'article add/edit',
|
||||
namespace => 'Asset_Article'
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
'article asset template variables' => {
|
||||
title => 'article asset template variables title',
|
||||
body => 'article asset template variables body',
|
||||
isa => [
|
||||
],
|
||||
fields => [
|
||||
],
|
||||
variables => [
|
||||
{
|
||||
'name' => 'linkTitle'
|
||||
},
|
||||
{
|
||||
'name' => 'linkURL'
|
||||
},
|
||||
{
|
||||
'name' => 'cacheTimeout'
|
||||
},
|
||||
{
|
||||
'name' => 'templateId'
|
||||
},
|
||||
{
|
||||
'name' => 'storageId'
|
||||
},
|
||||
],
|
||||
related => [
|
||||
{
|
||||
|
|
@ -157,6 +188,7 @@ our $HELP = {
|
|||
},
|
||||
]
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue