mozilla
Your Search Results

    Template:XULMethInc

    <%
    var lang = env.locale;
    
    
    /* set up the page name based on language */
    var methodName = "Method";
    
    switch(lang) {
        case 'de':
            methodName = "Methoden";
            break;
        case 'fr':
            methodName = "M├ęthodes";
            break;
        case 'pl':
            methodName = "Metoda";
            break;
        default:
            break;
    }
    
    
    /* get the method name */
    var api = $0;
    var destOldType = lang + '/docs/' + 'XUL:' + methodName + ':' + api;
    var destNewType = lang + '/docs/' + 'Mozilla/Tech/XUL/' + methodName + '/' + api;
    
    if (wiki.pageExists(destNewType)) { /* the page exists from the deki age */
        %><%-template("page", [destNewType])%><%
    } else if(wiki.pageExists(destOldType)) { /* the page exists from the mediawiki age */
        %><%-template("page", [destOldType])%><%
    } else { /* the page doesn't exist */
        log.debug("Neither exists");
        var targeturi = "/docs/new?slug=Mozilla/Tech/XUL/" + methodName + "/" + api;
        %><code><a href="<%=targeturi%>" class="new"><%=(api)%></a></code><%
    }
    %>
    Search for pages that use Template:XULMethInc to see example use cases and how many pages use this macro.

    Document Tags and Contributors

    Contributors to this page: lmorchard, Sheppy, fscholz, Ptak82, ethertank, Dria, Okome, chukito, Mrolappe, openjck
    Last updated by: Sheppy,