logic for dynamic view from admin