Since my shop is small, I’ve incorporated a router table into my table saw wing. But instead of hassling with a dedicated fence when routing, I came up with a dual-purpose auxiliary fence that clamps to the rip fence. The beauty of this fence is that I can use it for both routing and table saw operations. When used with the router, I can take advantage of the built-in dust collection port. And there are split faces that can be adjusted to accommodate any size of router bit. The T-slot on the face allows me to use featherboards and other accessories. To use the fence with the saw, simply clamp it on the side facing the blade. You can still utilize the T-slot for featherboards. But another advantage of the T-slot is it can be used to attach a sacrificial face when cutting rabbets. And the extra-tall fence provides plenty of support for tall workpieces.
The drawing below will give you all the details you need to build the fence. You can see how T-slots are formed on the back side of the faces. This allows the faces to be removed or adjusted using flange bolts and threaded knobs. Since building this fence, I can’t imagine being without it. I find myself using it on almost every project I build in the shop.