Fixed Fields in a Widget Type

Last Updated: Nov 22, 2021
documentation for the dotCMS Content Management System

After a new Widget Type is saved in dotCMS, the following Fixed System Fields are created:

  • Widget Title - stores the title of each Widget (dynamic pull of content), created using the Widget Type

  • Widget Usage - field for the explanation of how to use the Widget Type

  • Widget Code - field for the dynamic velocity code that will be pulling the content and using any *Custom Parameter Fields the dotCMS webmaster may wish to provide for the content contributor

  • Widget Pre-Execute - code placed in the pre-execute field will run before the page with the widget loads. This way a redirect, post, etc., can take place before the rest of the widget code is executed. This is especially useful when running checks (like user login), before revealing/running the rest of the code included in your widget. Although this widget field is left blank for most widgets, it can extremely useful when a portion of code needs to be run at the top of the page before any other content pulling ocurrs.

  • *Custom Parameter Field(s) (optional) - these fields can be created to accept values that Content Contributors can use to customize their dynamic pull of Content without knowing any Velocity code

Fixed-Custom Widget Fields *In the example image provided, the custom fields allow Content Publishers re-using the widget to stipulate how many/what kind of Products should be pulled dynamically on the Product Listing the Widget will create without having to write any HTML or Velocity code themselves. The following sections show how to use these fields together when creating a Widget Type.

On this page


We Dig Feedback

Selected excerpt: