[rt-users] Editing ShowCustomFields file to maintain Custom Field value formatting
Simon Jester
sklutch at hostile.org
Tue Mar 4 10:09:31 EST 2008
Morning, everyone!
Long time lurker (with occasional stupid questions) running into an issue with
a customization to ShowCustomFields file.
In 3.6.1, I edited the ShowCustomfields file to inject a <pre></pre> statement
just inside the <li> blocks. This took care of an issue in which the carriage
returns in the custom field value were being stripped on display by the
browsers. (Interestingly enough, the returns were in the page source but were
stripped on display). This worked for some time and all was happy.
Now, I'm deploying replacement hardware (beefy!) and taking the opportunity to
bump my installation to 3.6.5 and I'm stymied by the changes made to the
ShowCustomFields file in which the code block that was present in 3.6.1 was
moved to a subroutine and updated. If I use the same logic and insert my
<pre></pre> statement just inside the <li> block, it just gets ignored and the
custom fields are a jumble of text.
What up with that? Can someone point me to the proper place/method to insert
these statements? Or is there a better way that I've completely missed in my
zeal to edit source files? :)
sklutch
<<<<3.6.1 file changes>>>>
% while (my $Value = $Values->Next()) {
<li>
<pre> <---Added
% if ($CustomField->LinkValueTo) {
<a href="<%$Value->LinkValueTo|n%>" target="_new">
% }
(...)
<script><!--
ahah('<%$Value->IncludeContentForValue%>', 'object_cf_value_<%
$Value->id%>');
--></script>
% }
</pre> <---Added
</li>
<<<<3.6.5 Unsuccessful file changes>>>>
<ul>
% while ( my $Value = $Values->Next ) {
<li>
<pre> <---Added
% $print_value->( $CustomField, $Value );
</pre> <---Added
</li>
% }
</ul>
More information about the rt-users
mailing list