@@ -127,36 +127,52 @@ export function getSeeAlsoLinksForItem(theItem: any): SeeAlsoLinkGroup[] {
127127 switch ( itemType ) {
128128 case 'function' :
129129 seeAlso = shared ?. see_also ?? client ?. see_also ?? server ?. see_also ?? [ ] ;
130- addToSeeAlso = [ `functions:any:${ itemCategoryName } ` , `events:any:${ itemCategoryName } ` ] ;
130+ addToSeeAlso = [
131+ `functions:any:${ itemCategoryName } ` ,
132+ `events:any:${ itemCategoryName } ` ,
133+ `elements:any:${ itemCategoryName } ` ,
134+ `article:Scripting_Functions` ,
135+ ] ;
131136 break ;
132137 case 'event' :
133138 seeAlso = see_also ?? [ ] ;
134- addToSeeAlso = [ `events:any:${ itemCategoryName } ` , `functions:any:${ itemCategoryName } ` ] ;
139+ addToSeeAlso = [
140+ `events:any:${ itemCategoryName } ` ,
141+ `functions:any:${ itemCategoryName } ` ,
142+ `elements:any:${ itemCategoryName } ` ,
143+ `article:Scripting_Events` ,
144+ ] ;
135145 break ;
136146 case 'element' :
137147 seeAlso = see_also ?? [ ] ;
138148 const elementCategory = getElementCategory ( theItem ) ;
139149 if ( elementCategory === 'GUI' ) {
140150 // Show GUI functions, events and other GUI element types
151+ // as well as the Element article
141152 addToSeeAlso = [
142153 `functions:any:${ elementCategory } ` ,
143154 `events:any:${ elementCategory } ` ,
144155 `elements:any:${ elementCategory } ` ,
156+ `article:Element` ,
145157 ] ;
146158 } else if ( elementCategory === 'General' ) {
147159 // Also show generic Element functions and events if category is General
148160 addToSeeAlso = [
149161 `functions:any:${ niceName } ` ,
150162 `events:any:${ niceName } ` ,
163+ `elements:any:${ niceName } ` ,
151164 `functions:any:Element` ,
152165 `events:any:Element` ,
166+ `article:Element` ,
153167 ] ;
154168 }
155169 else {
156170 // Show all functions and events for the element type
171+ // and the Element article
157172 addToSeeAlso = [
158173 `functions:any:${ niceName } ` ,
159174 `events:any:${ niceName } ` ,
175+ `article:Element` ,
160176 ] ;
161177 }
162178 break ;
0 commit comments