Open main menu

Changes

2,758 bytes removed ,  17:50, 22 January 2023
no edit summary
--><!--
--><!--
--><!-- set parent topic-->{{#if: {{{Inherited From|}}}<!-- -->|<!-- --><!-- Get the properties required to format the title from Inherited From -->{{#vardefine: varTitleFormula| {{#show: {{{Inherited From|}}}|?Question Title Formula|link=none}} }}<!-- -->{{#vardefine: varPredicate| {{#show: {{{Inherited From|}}}|?Predicate|link=none}} }}<!-- -->{{#vardefine: varObject| {{#show: {{{Inherited From|}}}|?Object Class|link=none}} }}<!-- --><!-- --><!-- get the inherited topic's subject -->{{#vardefine: varInheritedSubject| {{#show: {{{Inherited From|}}}|?Subject|link=none}} }}<!-- --><!-- --><!-- Get the list of all the classes that the Subject of the Inherited From subsumes -->{{#arraydefine: arraySubsumesTerms|{{#ask: [[-Subsumes items::{{#var: varInheritedSubject}}]]|link=none}} | , |unique}}<!-- --><!-- --><!-- Get the list of all the parent classes of the Subject of the question -->{{#arraydefine: arrayParentTerms|{{GetPropertyValues|object={{{Subject|}}}|property=Parent Class|link=none}} | , |unique}}<!-- --><!-- --><!-- Get the intersection of the two arrays -->{{#arrayintersect: arrayIntersectTerms|arraySubsumesTerms|arrayParentTerms|}}<!-- --><!-- --><!-- For each item in the intersection array, format the question page title according to the formula taken from Inherited From -->{{#arrayprint: arrayIntersectTerms||varTerm<!-- -->|<!-- -->{{#vardefine: varTitle| {{DecodeTitleFormula|formula={{#var: varTitleFormula}}|subject=varTerm|predicate={{#var: varPredicate}}|object={{#var: varObject}}|}} }}<!-- --><!-- -->{{#set: Parent Topic={{#var: varTitle}}|}}<!-- --><!-- -->}}<!-- arrayprint --><!-- --><!-- also construct an array with links or red links to be displayed at the bottom -->{{#arraydefine: arrayParentPageLinks<!-- -->|{{#arrayprint: arrayIntersectTerms||varTerm<!-- -->|<!-- -->{{#vardefine: varTitle| {{DecodeTitleFormula|formula={{#var: varTitleFormula}}|subject=varTerm|predicate={{#var: varPredicate}}|object={{#var: varObject}}|}} }}<!-- --><!-- --><!-- check if the page exists -->{{#ifexist:{{#var: varTitle}}<!-- -->|<!-- exist: add the link to the page -->[[{{#var: varTitle}}]]<!-- -->|<!-- doesn't exist: add the formlink -->{{#formlink:form=Topic|link text={{#var: varTitle}}|target={{#var: varTitle}}|query string=Topic[Subject]=varTerm&Topic[Inherited From]={{{Inherited From|}}}|}}<!-- -->}}<!-- if exists --><!-- -->}}<!-- arrayprint -->| , |unique<!-- -->}}<!-- arraydefine --><!-- -->|<!-- not inherited: still construct an empty array for the use below -->{{#arraydefine: arrayParentPageLinks}}<!-- --><!---->}}<!-- if inherited from--><!--
--><!--
--><!--