Search code examples
phptemplatesmodx

Modx custom tv with multiple inputs


I need to build a custom tv in modx that will all a user to select a image, a title and a date.

Can't seem to find any help other than the docs with although detailed don't answer my problem.

Anyone done this before and are able to advise me further

Cheers


Solution

  • I'm not 100% sure, if this is what you're trying to archieve, but I think multiItemsGridTv (MIGX) for modX revolution is what you want.

    From the docs:

    MIGX (multiItemsGridTv for modx) is a custom-tv-input-type for adding multiple items into one TV-value and a snippet for listing this items on your frontend.

    It has a configurable grid and a configurable tabbed editor-window to add and edit items. Each item can have multiple fields.

    For each field you can use another tv-input-type.

    Essentially, you can make up a set of multiple different template variables (including images), that always belong together. If you then assign your MIGX tv to a template, you can enter as much of these sets as needed per resource.

    You can download it via package management or from the modX Extras Repository.