I'm using Sugarcube 2 so the implementation may be different, but the magic here will involve CSS. Here's the code I'm using to accomplish this in my game. I'm simply 'dimming' mine with opacity, but you can change colours, styling etc in any way you want that CSS allows.
.inactive {
pointer-events: none;
cursor: default;
opacity: .2;
}
Then any link you want greyed out will just need to be in a <span>, <div> etc with that class applied. I'm not entirely fluent in JS, which as I understand Snowman uses, but I believe this should get you started.
if (hasHammer == true) {
/* Regular link to "Forced Entry" passage */
} else {
/* Wrap the link to the "Forced Entry" passage in <span class = "inactive"></span> */
}
If it helps, here's the Sugarcube 2 synax I'd use to do this.
<<if $hasHammer == true>>
[[Break the window!|Forced Entry]]
<<else>>
<span class = "inactive">[[Break the window!|Forced Entry]]</span>
<</if>