How to programatically get all linked items for a given Sitecore item?Admin UI for PRC and REP roles not working on Azure PaaS on vanilla Sitecore 9Sitecore Related Items to publish only Related Media items of an itemHow to prevent an item from being moved to another folder accidentally?Remove certain items from control panel for some usersIs there a page on which I can view all Sitecore jobs running?

Why aren't rockets built with truss structures inside their fuel & oxidizer tanks to increase structural strength?

What can I do to increase the amount of LEDs I can power with a pro micro?

How to measure if Scrum Master is making a difference and when to give up

How would armour (and combat) change if the fighter didn't need to actually wear it?

Does the C++ standard guarantee that a failed insertion into an associative container will not modify the rvalue-reference argument?

Escape Velocity - Won't the orbital path just become larger with higher initial velocity?

How to prevent criminal gangs from making/buying guns?

How to get locks that are keyed alike?

Why does this Jet Provost strikemaster have a textured leading edge?

What's a good pattern to calculate a variable only when it is used the first time?

How can I find an old paper when the usual methods fail?

Does an Irish VISA WARNING count as "refused entry at the border of any country other than the UK?"

What are the advantages of this gold finger shape?

A+ rating still unsecure by Google Chrome's opinion

How does the Moon's gravity affect Earth's oceans despite Earth's stronger gravitational pull?

When did Bilbo and Frodo learn that Gandalf was a Maia?

What allows us to use imaginary numbers?

Can anybody tell me who this Pokemon is?

Is there a word for returning to unpreparedness?

Weird resistor with dots around it

What is the most difficult concept to grasp in Calculus 1?

What was the intention with the Commodore 128?

Go to last file in vim

What's the point of writing that I know will never be used or read?



How to programatically get all linked items for a given Sitecore item?


Admin UI for PRC and REP roles not working on Azure PaaS on vanilla Sitecore 9Sitecore Related Items to publish only Related Media items of an itemHow to prevent an item from being moved to another folder accidentally?Remove certain items from control panel for some usersIs there a page on which I can view all Sitecore jobs running?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3















I'm wondering if there is some API/Code/Trick on Sitecore to fetch all linked/related Items to a given Sitecore item, just like we have on the XP Admin interface?



My goal here is to find all pages using a given item as a data source of one of its renderings.



enter image description here










share|improve this question



















  • 2





    Something like Sitecore.Globals.LinkDatabase.GetReferrers(current item) or I missed the point of your question?

    – Marek Musielak
    9 hours ago











  • Actually, that's exactly what I was looking for, thanks Marek :)

    – Hugo Santos
    9 hours ago

















3















I'm wondering if there is some API/Code/Trick on Sitecore to fetch all linked/related Items to a given Sitecore item, just like we have on the XP Admin interface?



My goal here is to find all pages using a given item as a data source of one of its renderings.



enter image description here










share|improve this question



















  • 2





    Something like Sitecore.Globals.LinkDatabase.GetReferrers(current item) or I missed the point of your question?

    – Marek Musielak
    9 hours ago











  • Actually, that's exactly what I was looking for, thanks Marek :)

    – Hugo Santos
    9 hours ago













3












3








3








I'm wondering if there is some API/Code/Trick on Sitecore to fetch all linked/related Items to a given Sitecore item, just like we have on the XP Admin interface?



My goal here is to find all pages using a given item as a data source of one of its renderings.



enter image description here










share|improve this question














I'm wondering if there is some API/Code/Trick on Sitecore to fetch all linked/related Items to a given Sitecore item, just like we have on the XP Admin interface?



My goal here is to find all pages using a given item as a data source of one of its renderings.



enter image description here







admin-pages related-items






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 9 hours ago









Hugo SantosHugo Santos

1,4291 gold badge3 silver badges20 bronze badges




1,4291 gold badge3 silver badges20 bronze badges










  • 2





    Something like Sitecore.Globals.LinkDatabase.GetReferrers(current item) or I missed the point of your question?

    – Marek Musielak
    9 hours ago











  • Actually, that's exactly what I was looking for, thanks Marek :)

    – Hugo Santos
    9 hours ago












  • 2





    Something like Sitecore.Globals.LinkDatabase.GetReferrers(current item) or I missed the point of your question?

    – Marek Musielak
    9 hours ago











  • Actually, that's exactly what I was looking for, thanks Marek :)

    – Hugo Santos
    9 hours ago







2




2





Something like Sitecore.Globals.LinkDatabase.GetReferrers(current item) or I missed the point of your question?

– Marek Musielak
9 hours ago





Something like Sitecore.Globals.LinkDatabase.GetReferrers(current item) or I missed the point of your question?

– Marek Musielak
9 hours ago













Actually, that's exactly what I was looking for, thanks Marek :)

– Hugo Santos
9 hours ago





Actually, that's exactly what I was looking for, thanks Marek :)

– Hugo Santos
9 hours ago










2 Answers
2






active

oldest

votes


















4














You can use from code: ItemLink[] itemLinks = Globals.LinkDatabase.GetReferrers(item);



Or from Content Editor you can use Link ribbon button from Navigate tab:



enter image description here






share|improve this answer


































    1














    You can use Link Database via GetReferrers method.
    e.g.



    var links = Globals.LinkDatabase.GetReferrers(item);
    if (links == null)
    return new Item[0];
    var linkedItems = links.Select(i => i.GetSourceItem()).Where(i => i != null);





    share|improve this answer



























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "664"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsitecore.stackexchange.com%2fquestions%2f20525%2fhow-to-programatically-get-all-linked-items-for-a-given-sitecore-item%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      4














      You can use from code: ItemLink[] itemLinks = Globals.LinkDatabase.GetReferrers(item);



      Or from Content Editor you can use Link ribbon button from Navigate tab:



      enter image description here






      share|improve this answer































        4














        You can use from code: ItemLink[] itemLinks = Globals.LinkDatabase.GetReferrers(item);



        Or from Content Editor you can use Link ribbon button from Navigate tab:



        enter image description here






        share|improve this answer





























          4












          4








          4







          You can use from code: ItemLink[] itemLinks = Globals.LinkDatabase.GetReferrers(item);



          Or from Content Editor you can use Link ribbon button from Navigate tab:



          enter image description here






          share|improve this answer















          You can use from code: ItemLink[] itemLinks = Globals.LinkDatabase.GetReferrers(item);



          Or from Content Editor you can use Link ribbon button from Navigate tab:



          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 8 hours ago









          Gatogordo

          13.6k2 gold badges20 silver badges68 bronze badges




          13.6k2 gold badges20 silver badges68 bronze badges










          answered 9 hours ago









          Vlad IobagiuVlad Iobagiu

          14.3k2 gold badges13 silver badges40 bronze badges




          14.3k2 gold badges13 silver badges40 bronze badges


























              1














              You can use Link Database via GetReferrers method.
              e.g.



              var links = Globals.LinkDatabase.GetReferrers(item);
              if (links == null)
              return new Item[0];
              var linkedItems = links.Select(i => i.GetSourceItem()).Where(i => i != null);





              share|improve this answer





























                1














                You can use Link Database via GetReferrers method.
                e.g.



                var links = Globals.LinkDatabase.GetReferrers(item);
                if (links == null)
                return new Item[0];
                var linkedItems = links.Select(i => i.GetSourceItem()).Where(i => i != null);





                share|improve this answer



























                  1












                  1








                  1







                  You can use Link Database via GetReferrers method.
                  e.g.



                  var links = Globals.LinkDatabase.GetReferrers(item);
                  if (links == null)
                  return new Item[0];
                  var linkedItems = links.Select(i => i.GetSourceItem()).Where(i => i != null);





                  share|improve this answer













                  You can use Link Database via GetReferrers method.
                  e.g.



                  var links = Globals.LinkDatabase.GetReferrers(item);
                  if (links == null)
                  return new Item[0];
                  var linkedItems = links.Select(i => i.GetSourceItem()).Where(i => i != null);






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 9 hours ago









                  josedbaezjosedbaez

                  1,2528 silver badges29 bronze badges




                  1,2528 silver badges29 bronze badges






























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Sitecore Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsitecore.stackexchange.com%2fquestions%2f20525%2fhow-to-programatically-get-all-linked-items-for-a-given-sitecore-item%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                      Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                      199年 目錄 大件事 到箇年出世嗰人 到箇年死嗰人 節慶、風俗習慣 導覽選單