Results 1 to 7 of 7

Thread: Custom HTML link in template

  1. #1
    sunside is offline Sugar Community Member
    Join Date
    Oct 2005
    Posts
    79

    Post Custom HTML link in template

    Hi,

    we have been using a custom HTML link in our Opportunity DetailView template in this way:

    Code:
    <span sugar='slot4b'><a href="../page{MY_ID_C}.html" class="tabDetailViewDFLink"
    target="_blank">{MY_ID_C}</a></span sugar='slot'>
    After the patch to 4.5.1e, the number in {MY_ID_C} gets formatted according to the user defined number format, e.g. 1,234 instead of 1234, which breaks the link.

    How can I tell Sugar that it should insert a plain, unformatted number at the place of {MY_ID_C}?

    Or is there a more elegant way to do this?

    Oh, and BTW, I have another problem: In one template in Studio, I cannot move the labels of the EditView page; they are not draggable. Some few labels are still draggable, but the majority is not. Those that can be moved seem to have a 'colspan="1"' in the according <td>-tag; but adding colspan="1" doesn't change anything. I have already tried to run "Repair" - "Update Studio". Any help is greatly appreciated.

    Cheers
    Sunside

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Custom HTML link in template

    Hey sunside,

    For the first one what's the data type set up as? Could it be because the data type is money or numeric? Would int or integer work?

    For the second item, are the span slots in your template in numerical order such as:
    span sugar='slot12'
    span sugar='slot12b'

    span sugar='slot13'
    span sugar='slot13b'

    and so on? If not, some items may not be able to move.

    Hope this helps,

  3. #3
    sunside is offline Sugar Community Member
    Join Date
    Oct 2005
    Posts
    79

    Default Re: Custom HTML link in template

    Hi Eggsurplus,

    thanks for your quick and constructive reply.

    Quote Originally Posted by eggsurplus
    For the first one what's the data type set up as? Could it be because the data type is money or numeric? Would int or integer work?
    The data type is int in Sugar, and int(8) in the database. So it must be something else.

    Quote Originally Posted by eggsurplus
    For the second item, are the span slots in your template in numerical order such as:
    span sugar='slot12'
    span sugar='slot12b'

    span sugar='slot13'
    span sugar='slot13b'

    and so on? If not, some items may not be able to move.

    Hope this helps,
    That's probably the problem, I will try to check everything tomorrow. There's over 100 custom fields in there, and I have been doing some manual adjustments to the template.

    Thanks already

  4. #4
    sunside is offline Sugar Community Member
    Join Date
    Oct 2005
    Posts
    79

    Default Re: Custom HTML link in template

    Does noone have any idea about the number format for the INT field?

  5. #5
    ivolator's Avatar
    ivolator is offline Sugar Community Member
    Join Date
    Sep 2006
    Location
    Dagobah
    Posts
    98

    Default Re: Custom HTML link in template

    Quote Originally Posted by sunside
    Does noone have any idea about the number format for the INT field?
    Here is an idea...
    In your vardefs.php find your field def. if it is a custom field the definition is in cache/dynamic_fields/YOURMODULE/fields.php.
    .... then put this in the field def
    PHP Code:
    'disable_num_format' => true
    Let me know if it works

  6. #6
    sunside is offline Sugar Community Member
    Join Date
    Oct 2005
    Posts
    79

    Default Re: Custom HTML link in template

    Quote Originally Posted by ivolator
    Here is an idea...
    In your vardefs.php find your field def. if it is a custom field the definition is in cache/dynamic_fields/YOURMODULE/fields.php.
    .... then put this in the field def
    PHP Code:
    'disable_num_format' => true
    Let me know if it works
    I have inserted 'disable_num_format' => true in the Array for that field's definition, but it didn't change the behaviour of the field.

  7. #7
    ivolator's Avatar
    ivolator is offline Sugar Community Member
    Join Date
    Sep 2006
    Location
    Dagobah
    Posts
    98

    Default Re: Custom HTML link in template

    Works in 4.5.1b as you need it.
    What data type of field is the custom field you have?
    Also try locating this function in SugarBean unformat_all_fields().
    See if it is there. Also look for the function it calls unformat_number() located in Currency.php
    I am guessing your data type is not 'int', 'float', 'double', 'uint', 'ulong', 'long', 'short', 'tinyint', 'currency', 'decimal' OR
    You have modified the wrong vardefs.php

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 2007-06-19, 02:37 PM
  2. Campaign - Template - HTML - Destroy
    By hijacker in forum Help
    Replies: 0
    Last Post: 2007-05-21, 08:56 AM
  3. Custom fields in Alert Template Condition?
    By prismusa in forum Help
    Replies: 2
    Last Post: 2007-01-18, 05:30 PM
  4. Asterisk Patch 1.1.0 Crash on logon
    By skyracer in forum Help
    Replies: 6
    Last Post: 2006-07-08, 06:30 AM
  5. Replies: 7
    Last Post: 2006-06-06, 07:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •