[rt-users] RTFM howto modify the way how articles are inserted ?
Norton, Ian
i.norton at lancaster.ac.uk
Mon Dec 11 11:15:34 EST 2006
Hi Jodok,
> We created a custom field for RTFM Articles called "Description"
> which is an textarea that usually contains an HOWTO that gets
> replied from our helpdesk to the requestors.
>
> It will be inserted like this in the ticket:
>
> 1 #9: HOWTO request a password reset.
> 2 -----------------------------------
> 3
> 4 Description:
> 5 -----------
> 6 To request a password reset please submit the web form at:
> 7 http://somewhere.nowhere.tld/passwords/reset/
>
> We would like to get rid of line 1-5 and only get the content
> of the custom field inserted but not the name "Description"
> nor the Titel of the RTFM article.
> We do not want that text as displayed in line 1-5 in the
> ticket and the reply.
>
> How could we achieve this ?
The newest version of RTFM has this as a configurable option.
Alternatively, copy html/RTFM/Article/Elements/Preformatted to your
local tree and apply this patch:
<snip>
--- local/html/RTFM/Article/Elements/Preformatted 2004-03-31
00:57:43.000000000 +0100
+++ local/html/RTFM/Article/Elements/Preformatted 2006-02-21
19:19:47.000000000 +0000
@@ -16,10 +16,10 @@
%#
%# END LICENSE BLOCK
-#<%$Article->Id%>: <%$Article->Name%>
-<%'-' x length("#".$Article->Id.": ".$Article->Name) %>
+%# #<%$Article->Id%>: <%$Article->Name%>
+%# <%'-' x length("#".$Article->Id.": ".$Article->Name) %>
-<% $Article->Summary%>
+%# <% $Article->Summary%>
%my $cfs = $Article->ClassObj->CustomFields;
% while (my $cf = $cfs->Next) {
@@ -31,8 +31,8 @@
% if ($content =~ /<(.{1,5})>/) {
% $content = de_htmlify($content);
% }
-<%$cf->Name%>:
-<%'-' x length($cf->Name) %>
+%# <%$cf->Name%>:
+%# <%'-' x length($cf->Name) %>
<%$content%>
% } else {
% my $val = $values->Next;
</snip>
That's based on RTFM-2.0.4.
YMMV, there might be better ways of achieving this.
Regards, Ian.
More information about the rt-users
mailing list