Social tagging is one of the most important ways to organize and index online resources. Recommendation in social tagging systems, e.g. tag recommendation, item recommendation and user recommendation, is used to improve the quality of tags and to ease the tagging or searching process. Existing works usually provide recommendations by analyzing relation information in social tagging systems, suffering a lot from the over sparse problem. These approaches ignore information contained in the content of resources, which we believe should be considered to improve recommendation quality and to deal with the over sparse problem. In this paper we propose a recommendation approach for social tagging systems that combines content and relation analysis in a single model. By modeling the generating process of social tagging systems in a latent Dirichlet allocation approach, we build a fully generative model for social tagging, leverage it to estimate the relation between users, tags and resources and achieve tag, item and user recommendation tasks. The model is evaluated using a CiteULike data snapshot, and results show improvements in metrics for various recommendation tasks.