whistlemaker is right. I haven't come upon any situation where you needed a / before the id call just the [[~id]]
Is there a reason for the double span tag? Of course that shouldn't cause a problem but seems like extra tags for nothing.
The reason you are ending up back on the root page is that MODX is not finding the link path in your code. When this happens MODX will always default to the site root.
MODx helps me stay in the white
That was my guess Whitesphynx, I also tried removing the / and still same issue. Any idea why it's not seeing the path?
Are you certain the ID [[~5]] is a valid resource?
Is it published?
MODx helps me stay in the white