Welcome to TalkGraphics.com
Results 1 to 5 of 5

Thread: Internal links

  1. #1
    Join Date
    May 2002
    Location
    Canada
    Posts
    3,339

    Default Internal links

    Hi folks. How can I find out what links are connected for internal links in a website. I want to rename a page but want all internal links to point to that new page.

    Thanks.


  2. #2
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,502

    Default Re: Internal links

    I am pretty sure if you change a page name the link automatically changes. Give it a try.

  3. #3
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,813

    Default Re: Internal links

    behzad, your ask is very ambiguous. You seem to be implying all internal links to go to a completely new page (and location).

    If you have used Link to links then your XDA recalculates any changes when you change the current page name to another (what Gary P said).
    Ditto for changes to Anchors, Headings and Smart Fields. [Page name change Help --> Support]

    If you have added links manually as in Link to Web or Email address then these have to be manually changed. [Link change help.htm --> support.htm]

    Your XDA has no search & replace capability for links.
    To change [Link old location --> new location], I would Preview the page and open Browser > Developer Tools > Console and paste in the following:
    Code:
    var x = document.querySelectorAll("a");
    var myarray = []
    for (var i=0; i<x.length; i++){
    var nametext = x[i].textContent;
    var cleantext = nametext.replace(/\s+/g, ' ').trim();
    var cleanlink = x[i].href;
    myarray.push([cleantext,cleanlink]);
    };
    function make_table() {
        var table = '<table><thead><th>Name</th><th>Links</th></thead><tbody>';
       for (var i=0; i<myarray.length; i++) {
                table += '<tr><td>'+ myarray[i][0] + '</td><td>'+myarray[i][1]+'</td></tr>';
        };
    
        var w = window.open("");
    w.document.write(table); 
    }
    make_table()
    This creates a listing of all links.
    You can then check the internal ones to see what you need to alter in the design.

    Acorn
    Last edited by Acorn; 24 December 2021 at 05:36 PM. Reason: Tidied away typos
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  4. #4
    Join Date
    May 2002
    Location
    Canada
    Posts
    3,339

    Default Re: Internal links

    Thank you Both. I used an existing page and renamed it and it did it automatically. For assistance I used google search console/links/internal links.
    Acorn how did you learn coding?

  5. #5
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,813

    Default Re: Internal links

    Quote Originally Posted by behzad View Post
    Thank you Both. I used an existing page and renamed it and it did it automatically. For assistance I used google search console/links/internal links.
    Acorn how did you learn coding?
    50 years of practice.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

 

 

Tags for this Thread

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
  •