text: Title: Enhancement: Abstraction for injecting template globals
  Body: ### Summary
  
  It would be nice to have a nice abstraction for injecting globals into templates so that we don't have to do such a dance around this current process (see #basic-examples)
  
  
  ### Basic Example
  
  Some examples of what is currently required I think:
  
  @Alc-Alc's
  ```py
  """Template config."""
  from __future__ import annotations
  
  import os
  from typing import Any
  
  from jinja2 import Environment
  from litestar import Litestar
  from litestar.contrib.jinja import JinjaTemplateEngine
  from litestar.template.config import TemplateConfig
  
  def create_environment() -> Environment:
      env = Environment()
      env.globals['BASE_PATH'] = "/prod-path" if os.getenv("ENVIRONMENT", "dev") == "prod" else "/"
      return env
  
  
  config = TemplateConfig(
      directory="/path/to/templates",
      engine=JinjaTemplateEngine.from_environment(create_environment()),
  )
  
  app = Litestar(template_config=config)
  ```
  
  or mine
  ```py
  """Template config."""
  from __future__ import annotations
  
  import os
  from typing import Any
  
  from jinja2 import Environment
  from litestar import Litestar
  from litestar.contrib.jinja import JinjaTemplateEngine
  from litestar.template.config import TemplateConfig
  
  
  def set_base_path(engine_instance: Any) -> None:
      """Set the base path for the template engine."""
      env = os.getenv("ENVIRONMENT", "dev")
      
      if hasattr(engine_instance, "engine") and isinstance(engine_instance.engine, Environment):
          engine_instance.engine.globals["BASE_PATH"] = "/prod-path" if env == "prod" else "/"
  
  
  config = TemplateConfig(
      directory="/path/to/templates",
      engine=JinjaTemplateEngine,
      engine_callback=set_base_path,
  )
  
  app = Litestar(
      template_config=config,
  )
  ```
  ...and then:
  ```html
  <a href="{{ BASE_PATH }}">some link</a>
  ```
  
  ### Drawbacks and Impact
  
  - maintenance burden
  
  ### Unresolved questions
  
  _No response_