A novel compact small-angle X-ray scattering (SAXS) setup with tuneable resolution in both direct and reciprocal space has been designed and tested for the study of nanostructured materials with a hierarchical structure. The setup exploits a set of compound refractive lenses that focus the X-ray beam at the detector position. Anodic alumina membranes with a self-ordered porous structure were chosen as test samples. The setup allows patterns to be collected with a minimum scattering vector value of 0.001 14;nm-1 and gives the possibility for an easy continuous switch between taking high-resolution statistically averaged diffraction data of macroscopically large sample volumes and lower-resolution diffraction on a small single domain of the anodic aluminium oxide film. It is revealed that the pores are longitudinal and their ordering within each domain tends towards the ideal hexagonal structure, whereas the in-plane orientation of the pore arrays changes from domain to domain. The possible advantages and disadvantages of the proposed compact SAXS scheme are discussed.