Sign in

Split other options in post editor

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2538
    rjcpereirarjcpereira

    Split the Other Options of a post configs in blocks/tabs, like the Custom Configs in Themes tab.

    #2630
    Tomasz DziudaTomasz Dziuda
    Moderator

    Hi,

    Can you clarify if I correctly understand – do you suggest to split “Other options” to two sections “Post options” (for the post options only) and “Custom options” (for custom options added by theme/future plugins)?

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #2643
    rjcpereirarjcpereira

    My suggestion would be something like this:

    "postConfig": [...], //renders to actual group: Other options
    "additionalConfig": [{
      //renders to a new group, in this case: Source
      "name": "sourceUrl",
      "label": "Source URL",
      "group": "Source",
      "type": "text"
    }, {
      //renders to a new group, in this case: Store
      "name": "storeLocation",
      "label": "Store Location",
      "group": "Store",
      "type": "text"
    }]

    or something like this:

    "postConfig": [...], //renders to actual group: Other options
    "additionalConfig": [{
      //renders to a new group, in this case: Source
      "label": "Source",
      "icon": "link",
      "fields": [{
        "name": "sourceUrl",
        "label": "Source URL",
        "type": "text"
      }]
    }, {
      //renders to a new group, in this case: Store
      "label": "Store",
      "icon": "market",
      "fields": [{
        "name": "storeLocation",
        "label": "Store Location",
        "type": "text"
      }]
    }]

    Just to split some important template config, in order to don’t have a gigant “Other options” section, that’s my case right now, I’m splitting with separator type.

    #2644
    rjcpereirarjcpereira

    This is one my theme config

    Attachments:
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.