Displacement modifier mapped to the side of an object?

I’m attempting to create rock layers as part of a canyon using the displacement modifier, but I am unsure of how to orient the modifier so that it only affects the sides of the canyon model.

This is the effect I’m trying to emulate:

This is what I have right now:

Does anyone know a good process to achieve something like the above image with the displacement modifier?

a marble texture should do it. it’s just a matter of using the right map input. for BI it would be ‘plane’. Not sure about cycles though.

I tried an approach such as that, using a side orthographic UV projection of the terrain for a new UV map. The displacement modifier used a marble texture positioned normal to the side-projected UV, but it doesn’t seem to have the result I’m looking for.

Here’s how it looks:

I am using Cycles.