I used a loop to iterate through each related term.
Inside the loop, I calculate the URL for the term and check if a corresponding page exists.
If a page exists, I construct an anchor tag with the URL and term name and add it to the $related_links slice.
If a page doesn't exist, simply add the term name to the $related_links slice.
Finally, used delimit to concatenate the related term links with a comma separator.
Hopefully, it will handle and solve the error It is hard to say because both snippets of codes work on localhost
just made this as an alternative to see if it could fix the bug As mentioned in the #96 issue
For testing i am not sure how i can achieve it since there is no preview based on the branch i guess unless merged
@SamGuay and @flavioazevedo would you look into this ?
I used a loop to iterate through each related term. Inside the loop, I calculate the URL for the term and check if a corresponding page exists. If a page exists, I construct an anchor tag with the URL and term name and add it to the $related_links slice. If a page doesn't exist, simply add the term name to the $related_links slice. Finally, used delimit to concatenate the related term links with a comma separator.
Hopefully, it will handle and solve the error It is hard to say because both snippets of codes work on localhost just made this as an alternative to see if it could fix the bug As mentioned in the #96 issue
For testing i am not sure how i can achieve it since there is no preview based on the branch i guess unless merged
@SamGuay and @flavioazevedo would you look into this ?