Zum Hauptinhalt gehen

What to do with the "category" of external links

Kommentare

5 Kommentare

  • Zendesk API User
    Author: Peter_Jodeleit - 7/8/2010 12:01

    I got some personal messages requesting how to define new categories. First i didn't understand the question until someone pointed out that there is a bug in the gui for the drop down box Category. If you type in some text and then directly switches to View mode the category is not saved. You have to click elswhere befor leaving the edit mode, then the value is saved. Refer to the (internal) issue id  #83090, the status for the upcoming R4 release is resolved :smileywink:

    0
  • Zendesk API User
    Author: guido_tesch - 2/3/2011 7:59

    I'm trying to script an external link checker and would like to use the category to define which links are to be checked. We have a total of 7 link templates, and only two of them should be checked. As category for these two templates, I typed "externalurl" into the combobox. (And clicked elsewhere before I saved. :smileywink:)

    If I now use the following code, I get a refCount of zero:

        refCount = 0;

        // Check all released external links (selected via category "external_url", which is set in the link templates)

        for (ref : context.project.getExternalReferences("externalurl", true)) {

            refCount++;

            // Perform the link check and react accordingly...

       }

    If I do the same code with "for (ref : context.project.getExternalReferences(true)) {", it works fine, except that of course all links are checked and not only the external URLs.

    Could you give me some hint as to what I am doing wrong? I couldn't find any further documentation for the method "getExternalReferences" that would help...

    Is there a way to access the category of a reference? (something like "ref.getcategory()")

    Thanks

    Guido

    0
  • Zendesk API User
    Author: Peter_Jodeleit - 2/3/2011 9:12

    The gui-bug I referred to is fixed since version 4.2.401.

    I'll try to check your code soon. In the meantime could you name your FirstSpirit version?

    0
  • Zendesk API User
    Author: guido_tesch - 2/3/2011 10:25

    We currently use server version 4.2.223.40456

    0
  • Zendesk API User
    Author: Peter_Jodeleit - 2/7/2011 7:08

    Your code works for me. Perhaps your content is not yet released? Try to iterate over the current references.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.