Hello,
Hope all are well.
I have hit a stumbling block on a website edit and wonder if someone can please cast their eye over this and see if anything jumps out as the cause of the problem.
TLDR; is it possible in a single MultiTV with type drop down to display a default option in the frontend without saving a resource?
Details...
I am editing a 1.4.15 website that has long been using a single MultiTV and Template Variable (as a combo in the MultiTV row template) with 12 different age groupings to display an age suitability system (think "traffic light" with red, orange and green) on pages.
There are 1500 pages all up and this has been working fine since it was first setup many moons ago. Not feasible to change from MultiTV.
I have been tasked with adding just one new age grouping (16+) and I am trying to add green as the default for that new age grouping so that the client does not have to manually save all 1500 pages. Green shows as selected as expected by default in the backend template (nice), but in the frontend the [+age16+] default data (aka the green class) for a resource is never included unless that resource is manually saved (bummer)... that is where I am stuck.
Here are the various templates...
The Template Variable variable has an Input Type of "DropDown List Menu" and has had the following values:
4||5||6||7||8||9||10||11||12||13||14||15
In adding the new age 16+ grouping, it would become:
4||5||6||7||8||9||10||11||12||13||14||15||16+
That's fine - it works in the multiTV. No problems.
The MultiTV has been used to assign a colour (via a classname) to each age grouping- eg
age04,age05,age06,...etc...,age13,age14,age15
with options:
blank (being the default), green, orange, red
I am tring to add age16 with options:
green the default, orange, red
The MultiTV row template previously looked like so and worked fine for individually save resources:
[+age04:isnot=``:then=` <div class="boxes [+age04+][*green-age-std:is=`4`:then=` age`*]"><span>4</span></div>`+]
[+age05:isnot=``:then=` <div class="boxes [+age05+][*green-age-std:is=`5`:then=` age`*]"><span>5</span></div>`+]
[+age06:isnot=``:then=` <div class="boxes [+age06+][*green-age-std:is=`6`:then=` age`*]"><span>6</span></div>`+]
[+age07:isnot=``:then=` <div class="boxes [+age07+][*green-age-std:is=`7`:then=` age`*]"><span>7</span></div>`+]
[+age08:isnot=``:then=` <div class="boxes [+age08+][*green-age-std:is=`8`:then=` age`*]"><span>8</span></div>`+]
[+age09:isnot=``:then=` <div class="boxes [+age09+][*green-age-std:is=`9`:then=` age`*]"><span>9</span></div>`+]
[+age10:isnot=``:then=` <div class="boxes [+age10+][*green-age-std:is=`10`:then=` age`*]"><span>10</span></div>`+]
[+age11:isnot=``:then=` <div class="boxes [+age11+][*green-age-std:is=`11`:then=` age`*]"><span>11</span></div>`+]
[+age12:isnot=``:then=` <div class="boxes [+age12+][*green-age-std:is=`12`:then=` age`*]"><span>12</span></div>`+]
[+age13:isnot=``:then=` <div class="boxes [+age13+][*green-age-std:is=`13`:then=` age`*]"><span>13</span></div>`+]
[+age14:isnot=``:then=` <div class="boxes [+age14+][*green-age-std:is=`14`:then=` age`*]"><span>14</span></div>`+]
[+age15:isnot=``:then=` <div class="boxes [+age15+][*green-age-std:is=`15`:then=` age`*]"><span>15</span></div>`+]
When adding these tests into the MultiTV row template, the [+age16+] default green option never displays in the frontend unless the resource is manually edited and saved.
This does not show at all in the frontend for a resource unless a resource is saved:
[+age16:isnot=``:then=` <div class="boxes [+age16+][*green-age-std:is=`16+`:then=` age`*]"><span>16+</span></div>`+]
The [+age16+] colour option does not show in the frontend unless a resource is saved. The rest of the line does show without saving (but I need the colour from [+age16+] otherwise the text is invisible and not styled).
<div class="boxes [+age16+] [*green-age-std:is=`16+`:then=`age `*]last"><span>17+</span></div>
Ditto - The [+age16+] colour option does not show in the frontend unless a resource is saved. The rest of the line does show without saving (but I need the colour from [+age16+] otherwise the text is invisible and not styled).
<div class="boxes [+age16+] [[if? &is=`[*green-age-std*]:is:16+` &then=`age ` &else=``]]last"><span>18+</span></div>
The MultiTV call looks like so:
[!multiTV?
&tvName=`age`
&docid=`[+id+]`
&outerTpl=`tv-ages-multiTV-wrapper`
&rowTpl=`tv-ages-multiTV-row`
&display=`all`
&emptyOutput=`1`
!]
The MultiTV config.inc.php looks like so:
<?php
$settings['display'] = 'single';
$settings['fields'] = array(
'age04' => array(
'caption' => '4',
'type' => 'dropdown',
'elements' => '||green||orange||red'
),
'age05' => array(
'caption' => '5',
'type' => 'dropdown',
'elements' => '||green||orange||red'
),
...ETC...
'age15' => array(
'caption' => '15',
'type' => 'dropdown',
'elements' => '||green||orange||red'
),
'age16' => array(
'caption' => '16+',
'type' => 'dropdown',
'elements' => 'green||orange||red'
)
);
$settings['configuration'] = array(
'enablePaste' => FALSE,
'enableClear' => FALSE,
'csvseparator' => ','
);
Am I missing something basic? Can a default option for [+age16+] display in the frontend without saving every resource individually?
Thanks in advance for any help and have a super day.