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;
|
||||
|
|
|
|||
|
|
@ -397,7 +397,7 @@ our $HELP = {
|
|||
],
|
||||
related => [
|
||||
{
|
||||
tag => 'data form fields add/edit',
|
||||
tag => 'data form list template',
|
||||
namespace => 'Asset_DataForm'
|
||||
},
|
||||
{
|
||||
|
|
@ -410,6 +410,16 @@ our $HELP = {
|
|||
'data form list template' => {
|
||||
title => '88',
|
||||
body => '89',
|
||||
isa => [
|
||||
{
|
||||
namespace => "Asset_Template",
|
||||
tag => "template variables"
|
||||
},
|
||||
{
|
||||
tag => 'wobject template',
|
||||
namespace => 'Asset_Wobject'
|
||||
}
|
||||
],
|
||||
fields => [
|
||||
],
|
||||
variables => [
|
||||
|
|
@ -526,10 +536,14 @@ our $HELP = {
|
|||
}
|
||||
],
|
||||
related => [
|
||||
{
|
||||
tag => 'data form template',
|
||||
namespace => 'Asset_DataForm'
|
||||
},
|
||||
{
|
||||
tag => 'data form add/edit',
|
||||
namespace => 'Asset_DataForm'
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,6 +4,12 @@ our $HELP = {
|
|||
'event add/edit' => {
|
||||
title => '72',
|
||||
body => '73',
|
||||
isa => [
|
||||
{
|
||||
tag => 'asset fields',
|
||||
namespace => 'Asset'
|
||||
},
|
||||
],
|
||||
fields => [
|
||||
{
|
||||
title => '512',
|
||||
|
|
@ -37,19 +43,28 @@ our $HELP = {
|
|||
},
|
||||
],
|
||||
related => [
|
||||
{
|
||||
tag => 'asset fields',
|
||||
namespace => 'Asset'
|
||||
},
|
||||
{
|
||||
tag => 'event template',
|
||||
namespace => 'Asset_Event'
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
##I didn't break out individual asset level variables here
|
||||
##because there are so few of them. --ck
|
||||
'event template' => {
|
||||
title => '96',
|
||||
body => '97',
|
||||
isa => [
|
||||
{
|
||||
tag => 'asset template',
|
||||
namespace => 'Asset'
|
||||
},
|
||||
{
|
||||
tag => 'template language',
|
||||
namespace => 'Asset_Template'
|
||||
},
|
||||
],
|
||||
fields => [
|
||||
],
|
||||
variables => [
|
||||
|
|
@ -59,12 +74,18 @@ our $HELP = {
|
|||
{
|
||||
'name' => 'start.label'
|
||||
},
|
||||
{
|
||||
'name' => 'eventStartDate'
|
||||
},
|
||||
{
|
||||
'name' => 'start.date'
|
||||
},
|
||||
{
|
||||
'name' => 'start.time'
|
||||
},
|
||||
{
|
||||
'name' => 'eventEndDate'
|
||||
},
|
||||
{
|
||||
'name' => 'end.date'
|
||||
},
|
||||
|
|
|
|||
|
|
@ -54,10 +54,6 @@ our $HELP = {
|
|||
},
|
||||
],
|
||||
related => [
|
||||
{
|
||||
tag => 'asset fields',
|
||||
namespace => 'Asset'
|
||||
},
|
||||
{
|
||||
tag => 'event add/edit',
|
||||
namespace => 'Asset_Event'
|
||||
|
|
@ -72,9 +68,20 @@ our $HELP = {
|
|||
}
|
||||
]
|
||||
},
|
||||
|
||||
'events calendar template' => {
|
||||
title => '94',
|
||||
body => '95',
|
||||
isa => [
|
||||
{
|
||||
tag => 'wobject template',
|
||||
namespace => 'Asset_Wobject'
|
||||
},
|
||||
{
|
||||
tag => 'template language',
|
||||
namespace => 'Asset_Template'
|
||||
},
|
||||
],
|
||||
fields => [
|
||||
],
|
||||
variables => [
|
||||
|
|
@ -255,25 +262,16 @@ our $HELP = {
|
|||
'name' => 'year'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
'name' => 'pagination.pageCount.isMultiple'
|
||||
},
|
||||
],
|
||||
related => [
|
||||
{
|
||||
tag => 'events calendar add/edit',
|
||||
namespace => 'Asset_EventsCalendar'
|
||||
},
|
||||
{
|
||||
tag => 'pagination template variables',
|
||||
namespace => 'WebGUI'
|
||||
},
|
||||
{
|
||||
tag => 'wobject template',
|
||||
namespace => 'Asset_Wobject'
|
||||
},
|
||||
{
|
||||
tag => 'template language',
|
||||
namespace => 'Asset_Template'
|
||||
},
|
||||
]
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -21,6 +21,21 @@ our $I18N = {
|
|||
lastUpdated => 1146455970
|
||||
},
|
||||
|
||||
'cacheTimeout' => {
|
||||
message => q|The amount of time this article will be cached.|,
|
||||
lastUpdated => 1164841027
|
||||
},
|
||||
|
||||
'templateId' => {
|
||||
message => q|The Id of the template used to display this Asset.|,
|
||||
lastUpdated => 1164841027
|
||||
},
|
||||
|
||||
'storageId' => {
|
||||
message => q|The Id of the storage object for this Asset that is used to store any attachments.|,
|
||||
lastUpdated => 1164841027
|
||||
},
|
||||
|
||||
'71' => {
|
||||
message => q|<p>Articles are the Swiss Army knife of WebGUI. Most pieces of static content can be added via the Article. Articles are Wobjects, so they inherit the properties of both Wobjects and Assets.</p>
|
||||
|
||||
|
|
@ -60,6 +75,17 @@ use templates from the "page" namespace.|,
|
|||
lastUpdated => 1119066250
|
||||
},
|
||||
|
||||
'article asset template variables title' => {
|
||||
message => q|Article Asset Template Variables|,
|
||||
lastUpdated => 1164841146
|
||||
},
|
||||
|
||||
'article asset template variables body' => {
|
||||
message => q|Every asset provides a set of variables to most of its
|
||||
templates based on the internal asset properties. Some of these variables may
|
||||
be useful, others may not.|,
|
||||
lastUpdated => 1164841201
|
||||
},
|
||||
|
||||
'28' => {
|
||||
message => q|View Responses|,
|
||||
|
|
|
|||
|
|
@ -70,24 +70,34 @@ our $I18N = {
|
|||
lastUpdated => 1149392729,
|
||||
},
|
||||
|
||||
'eventStartDate' => {
|
||||
message => q|The date and time this event starts as an epoch.|,
|
||||
lastUpdated => 1164744850,
|
||||
},
|
||||
|
||||
'start.date' => {
|
||||
message => q|The date this event starts.|,
|
||||
lastUpdated => 1149392729,
|
||||
message => q|The date this event starts in the user's default date format.|,
|
||||
lastUpdated => 1164744850,
|
||||
},
|
||||
|
||||
'start.time' => {
|
||||
message => q|The time this event starts.|,
|
||||
lastUpdated => 1149392729,
|
||||
message => q|The time this event starts in the user's default time format.|,
|
||||
lastUpdated => 1164744852,
|
||||
},
|
||||
|
||||
'eventEndDate' => {
|
||||
message => q|The date and time this event ends as an epoch.|,
|
||||
lastUpdated => 1164744850,
|
||||
},
|
||||
|
||||
'end.date' => {
|
||||
message => q|The date this event ends.|,
|
||||
lastUpdated => 1149392729,
|
||||
message => q|The date this event ends in the user's default date format.|,
|
||||
lastUpdated => 1164744853,
|
||||
},
|
||||
|
||||
'end.time' => {
|
||||
message => q|The time this event ends.|,
|
||||
lastUpdated => 1149392729,
|
||||
message => q|The time this event ends in the user's default time format.|,
|
||||
lastUpdated => 1164744855,
|
||||
},
|
||||
|
||||
'end.label' => {
|
||||
|
|
|
|||
|
|
@ -530,7 +530,13 @@ The title of an individual event.
|
|||
'507' => {
|
||||
'lastUpdated' => 1108397891,
|
||||
'message' => 'Calendar Scope'
|
||||
}
|
||||
},
|
||||
|
||||
'pagination.pageCount.isMultiple' => {
|
||||
message => q|Calendar Scope|,
|
||||
lastUpdated => 1108397891,
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue