You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the code below, only the template of the item is returned when calling articles.Links.GetValidLinks() or source.Links.GetValidLinks(). I've tried creating a hierarchy and using the LinkDatabaseSwitcher.
public void TestHierarchy()
{
using (Sitecore.FakeDb.Db db = new Sitecore.FakeDb.Db
{
new Sitecore.FakeDb.DbItem("Articles")
{
new Sitecore.FakeDb.DbItem("Getting Started"),
new Sitecore.FakeDb.DbItem("Troubleshooting")
}
})
{
Sitecore.Data.Items.Item articles =
db.GetItem("/sitecore/content/Articles");
In the code below, only the template of the item is returned when calling articles.Links.GetValidLinks() or source.Links.GetValidLinks(). I've tried creating a hierarchy and using the LinkDatabaseSwitcher.
public void TestHierarchy()
{
using (Sitecore.FakeDb.Db db = new Sitecore.FakeDb.Db
{
new Sitecore.FakeDb.DbItem("Articles")
{
new Sitecore.FakeDb.DbItem("Getting Started"),
new Sitecore.FakeDb.DbItem("Troubleshooting")
}
})
{
Sitecore.Data.Items.Item articles =
db.GetItem("/sitecore/content/Articles");
}
public void HowToWorkWithLinkDatabase()
{
// arrange your database and items
Sitecore.Data.ID sourceId = Sitecore.Data.ID.NewID;
Sitecore.Data.ID aliasId = Sitecore.Data.ID.NewID;
Sitecore.Data.ID linkedItemId = Sitecore.Data.ID.NewID;
}
The text was updated successfully, but these errors were encountered: