May 14, 2008, 2:39 PM
Veteran (1214 posts)
May 14, 2008, 2:39 PM
Post #27 of 33
Views: 932
Thanks!
Hmmm... I am still not getting it for some reason....
Here is what I put in the template:
<%~if Eng_Title%>
<%set Eng_Title_loop = Eng_Title_1($Eng_Title)%>
<h4><b>English Title<%if Eng_Title_loop.length > 1%>s<%endif%></b>: <%loop Eng_Title_loop%><%if Eng_Title_loop.length > 1 and not first%><%if last%></i>" and "<i><%else%>,</i>" "<i><%endif%><%endif%>"<%loop_value%><%if last%>.<%endif%>"
<%endloop%>
</h4><br /><br />
<%~endif%>
The global which I called Eng_Title_1, looks like this:
sub {
my $title = shift;
return $title ? [split(/\s+,\s+/, $title)] : [];
}
When I run it, I get no output.... just:
English Title:
I pared it down to just this (in case I scrwed up the if..elses):
<%~if Eng_Title%>
<%set Eng_Title_loop = Eng_Title_1($Eng_Title)%>
<h4><b>English Title<%if Eng_Title_loop.length > 1%>s<%endif%></b>:
<%loop Eng_Title_loop%>
<%loop_value%>
<%endloop%>
</h4><br /><br />
<%~endif%>
Same... no data back...
dave
Big Cartoon DataBase
Big Comic Book DataBase
Hmmm... I am still not getting it for some reason....
Here is what I put in the template:
<%~if Eng_Title%>
<%set Eng_Title_loop = Eng_Title_1($Eng_Title)%>
<h4><b>English Title<%if Eng_Title_loop.length > 1%>s<%endif%></b>: <%loop Eng_Title_loop%><%if Eng_Title_loop.length > 1 and not first%><%if last%></i>" and "<i><%else%>,</i>" "<i><%endif%><%endif%>"<%loop_value%><%if last%>.<%endif%>"
<%endloop%>
</h4><br /><br />
<%~endif%>
The global which I called Eng_Title_1, looks like this:
sub {
my $title = shift;
return $title ? [split(/\s+,\s+/, $title)] : [];
}
When I run it, I get no output.... just:
English Title:
I pared it down to just this (in case I scrwed up the if..elses):
<%~if Eng_Title%>
<%set Eng_Title_loop = Eng_Title_1($Eng_Title)%>
<h4><b>English Title<%if Eng_Title_loop.length > 1%>s<%endif%></b>:
<%loop Eng_Title_loop%>
<%loop_value%>
<%endloop%>
</h4><br /><br />
<%~endif%>
Same... no data back...
dave
Big Cartoon DataBase
Big Comic Book DataBase
May 14, 2008, 3:16 PM
Staff (4071 posts)
May 14, 2008, 3:16 PM
Post #28 of 33
Views: 930
Well, you did change the template code...
Here's what you probably want:
<%~set Eng_Title_loop = Eng_Title_1($Eng_Title)%>
English Title<%if Eng_Title_loop.length > 1%>s<%endif%>:
<%loop Eng_Title_loop%>
"<em><%loop_value%></em><%if Eng_Title_loop.length > 1%><%if not last%>,<%else%>.<%endif%><%endif%>"
<%set i = $Eng_Title_loop.length - 1%><%if Eng_Title_loop.length > 1 and $i == $row_num%> and<%endif%>
<%endloop%>
<%~endif%>
Adrian
Here's what you probably want:
Code:
<%~if Eng_Title%> <%~set Eng_Title_loop = Eng_Title_1($Eng_Title)%>
English Title<%if Eng_Title_loop.length > 1%>s<%endif%>:
<%loop Eng_Title_loop%>
"<em><%loop_value%></em><%if Eng_Title_loop.length > 1%><%if not last%>,<%else%>.<%endif%><%endif%>"
<%set i = $Eng_Title_loop.length - 1%><%if Eng_Title_loop.length > 1 and $i == $row_num%> and<%endif%>
<%endloop%>
<%~endif%>
Adrian
May 14, 2008, 3:40 PM
Veteran (1214 posts)
May 14, 2008, 3:40 PM
Post #29 of 33
Views: 926
Thanks Adrian.
I copied that EXACTLY... and I am NOT getting the results.
Here is my test page:
http://www.bcdb.com/...0489-Hakuja_Den.html
Look right under Cartoon Production Information...
The first "English Title" is your code...
The second is the Andy code (just so you can see it should show!)
Eng_Title_1 global is:
sub {
my $title = shift;
return $title ? [split(/\s+,\s+/, $title)] : [];
}
Template is:
<%~if Eng_Title%>
<%~set Eng_Title_loop = Eng_Title_1($Eng_Title)%>
English Title<%if Eng_Title_loop.length > 1%>s<%endif%>:
<%loop Eng_Title_loop%>
"<em><%loop_value%></em><%if Eng_Title_loop.length > 1%><%if not last%>,<%else%>.<%endif%><%endif%>"
<%set i = $Eng_Title_loop.length - 1%><%if Eng_Title_loop.length > 1 and $i == $row_num%> and<%endif%>
<%endloop%>
<%~endif%>
Sorry- I feel like an idiot for not seeing the problem. This is just abit above my level, though...
dave
Big Cartoon DataBase
Big Comic Book DataBase
I copied that EXACTLY... and I am NOT getting the results.
Here is my test page:
http://www.bcdb.com/...0489-Hakuja_Den.html
Look right under Cartoon Production Information...
The first "English Title" is your code...
The second is the Andy code (just so you can see it should show!)
Eng_Title_1 global is:
sub {
my $title = shift;
return $title ? [split(/\s+,\s+/, $title)] : [];
}
Template is:
<%~if Eng_Title%>
<%~set Eng_Title_loop = Eng_Title_1($Eng_Title)%>
English Title<%if Eng_Title_loop.length > 1%>s<%endif%>:
<%loop Eng_Title_loop%>
"<em><%loop_value%></em><%if Eng_Title_loop.length > 1%><%if not last%>,<%else%>.<%endif%><%endif%>"
<%set i = $Eng_Title_loop.length - 1%><%if Eng_Title_loop.length > 1 and $i == $row_num%> and<%endif%>
<%endloop%>
<%~endif%>
Sorry- I feel like an idiot for not seeing the problem. This is just abit above my level, though...
dave
Big Cartoon DataBase
Big Comic Book DataBase
May 14, 2008, 5:21 PM
Veteran (1214 posts)
May 14, 2008, 5:21 PM
Post #31 of 33
Views: 913
There we go! I am on 3.1! Sorry!
Tested the new global (nothing else changed).... same thing- no data...
dave
Big Cartoon DataBase
Big Comic Book DataBase
Tested the new global (nothing else changed).... same thing- no data...
dave
Big Cartoon DataBase
Big Comic Book DataBase
May 14, 2008, 9:00 PM
Veteran (1214 posts)
May 14, 2008, 9:00 PM
Post #33 of 33
Views: 900
Adrian:
Thanks for sticking with it. Yep, that last one is the cherry on the sundae... works sweet!
dave
Big Cartoon DataBase
Big Comic Book DataBase
Thanks for sticking with it. Yep, that last one is the cherry on the sundae... works sweet!
dave
Big Cartoon DataBase
Big Comic Book DataBase



