This week's TBB is about resolving Component links statically - i.e. at publish time. This is considered terribly bad practice , but sometimes, in the field, it is just what the custmer needs. It really goes against every Tridion principle and it will make the website completely inconsistent (e.g. dead links cannot be prevented). However, if you need to do it, this it how. The code below reads the 'Where Used' Pages for a Component. It takes the Page publish location URL and constructs a 'static' link to the Page. It will not even check if the page is published. public string ResolveLinkStatic( Engine engine, Package package, Component component) { if (component.BinaryContent == null ) { // is Content Component XmlElement node = component.GetListUsingItems( new UsingItemsFilter (engine.GetSession()) { ItemTypes = new ItemType [] { ItemType .Page }, IncludedVersions = VersionCondition .On
talk is cheap. show me the code.