It's been a while since I visited the Old City in Jerusalem. I recall that there is a giant mezuzah on the sidewall of the Zion Gate. I don't recall if all the Jerusalem gates have a mezuzah.
I'm curious as to why that mezuzah is needed? Perhaps, at some point, people actually did live in the wall itself? (See, e.g. Rahav who lived in the wall of Jericho.) However, the gate is a public entrance, and I understand that it is up to an individual to place the mezuzah on the home that he lives in, i.e. not a public place where no-one lives e.g. a Beth hakneset (Shulchan Aruch Yore Dea 286,3).
Or, maybe, because there are people living in the confines of the Old City, the gate acts as a communal entrance to all the other houses, there?
In short, does a gated walled city require a mezuzah at all? If not, why does that gate have a mezuzah, or is it just "decorative"?