This paper shows that any
compactly generated lattice is a subdirect product of subdirectly irreducible lattices
which are complete and upper continuous. An example of a compactly generated
lattice which cannot be subdirectly decomposed into subdirectly irreducible
compactly generated lattices is given. In the case of an ideal lattice of a lattice L, the
decomposition into subdirectly irreducible complete lattices is tied, via a special
completion process, to the finitely subdirectly irreducible homomorphic of
images L. It is also shown that any finite lattice satisfying the Whitman
condition is a retract of the ideal lattice of the dual ideal lattice of a free
lattice.