Thank you for the reply I have a custom ticket text field on the tickets and the contents of that field is a http:// address.
Right now when I view a ticket it shows the text of the field. What I would like is to have it be an actual link instead of just the text. That is why I was trying to insert the anchor tag so that the link would appear in the ticket. I did a search and I found only one instance where it was checking for 'text' but I can look again for the first and second loops like you described. Although I think I want to modify the first since I want to alter the look of the existing information. On Nov 19, 2007 5:31 PM, Erik Bray <[EMAIL PROTECTED]> wrote: > > > On Nov 19, 2007 4:45 PM, G S <[EMAIL PROTECTED]> wrote: > > > > I added a text field in the custom ticket area on my Trac 10.4 Install. > > It is called design and it is for holding a link to the Design Document. > > > > As of now when viewing the ticket the whole http://...... shows up. > > > > I would like to modify the ticket.cs so that it show a hyperlink > > instead of the text. > > > > I tried adding an elif to the ticket.cs > > > > if:field.type == 'text' && field.name =="design" ?><input type="text" > > id="<?cs > > var:name(field) ?>" name="<?cs > > var:name(field) ?>" value="<?cs <a href="' + > > var:ticket[name(field)] + '"> Design Document </a> ?>" / > > > > but obviously I am not a Clearsilver guru and this does not work. > > > > Anyone have a hint about where to go with this. > > Not tested, but I think this is what you want: > <?cs elif:field.type == 'text' && field.name == "design" ?> > <input type="text" id="<?cs var:name(field) ?>" > name="<?cs var:name(field) ?>" value="<?cs > var:ticket[name(field)] ?>" /> > <?cs /elif ?> > > Ticket.cs has two sections in which the fields are looped through: > The first is the display of the ticket itself at the top. The second > is the inputs for modifying the ticket. The above is what you want in > the inputs section. > > In the ticket display you just need > <a href="<?cs var:ticket[name(field)] ?>">Blah blah blah</a> > > I'm not sure what you were trying to do with the <a> tag in the value > of the input... > > Erik > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
