The well-known Lighthill-Whitham-Richards (LWR) theory is the fundamental pillar for most macroscopic traffic models. In the past, many methods were developed to numerically derive solutions for LWR problems. Examples for such numerical solution schemes are the cell transmission model, the link transmission model, and the variational theory (VT) of traffic flow. So far, the latter framework found applications in the fields of traffic modelling, macroscopic fundamental diagram estimation, multi-modal traffic analyses, and data fusion. However, these studies apply VT only at the link or corridor level. To the best of our knowledge, there is no methodology yet to apply VT at the network level. We address this gap by developing a VT-based framework applicable to networks. Our model allows us to account for source terms (e.g. inflows and outflows at intersections) and the propagation of spillbacks between adjacent corridors consistent with kinematic wave theory. We show that the trajectories extracted from a microscopic simulation fit the predicted traffic states from our model for a simple intersection with both source terms and spillbacks. We also use this simple example to illustrate the accuracy of the proposed model. Additionally, we apply our model to the Sioux Falls network and again compare the results to those from a microscopic simulation. Our results indicate a close fit of traffic states, but with substantially lower computational cost. The developed methodology is useful for network-wide traffic state estimations in real-time, or other applications within a model-based optimization framework.