Fix getCategory to use set_hst for proper categorization
Tags are now categorized based on their set_hst field, which points to the parent category tag (e.g., hst, spe, vue, vsn, msn). This uses the actual semantic relationship defined in the database rather than inferring from ref prefix or using the base. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
12
index.html
12
index.html
@@ -846,8 +846,16 @@ const Utils = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getCategory(tag) {
|
getCategory(tag) {
|
||||||
// Category is determined by the current base being viewed
|
// Category is determined by the tag's set_hst (parent category MRF)
|
||||||
return State.get("base");
|
const setHst = tag.set_hst;
|
||||||
|
if (!setHst) return State.get("base");
|
||||||
|
|
||||||
|
// Look up the category tag in hstTags
|
||||||
|
const hstTags = State.get("hstTags");
|
||||||
|
const categoryTag = hstTags.find(t => t.mrf === setHst);
|
||||||
|
|
||||||
|
// Return the ref of the category tag, or fall back to base
|
||||||
|
return categoryTag?.ref || State.get("base");
|
||||||
},
|
},
|
||||||
|
|
||||||
updateHash() {
|
updateHash() {
|
||||||
|
|||||||
Reference in New Issue
Block a user