https://twill.io logo
Join Discord
Powered by
# ❓questions
  • i

    ifox

    07/02/2021, 1:28 PM
    you mean you're using
    editInModal
    , correct?
  • u

    user

    07/02/2021, 1:28 PM
    Yeah
  • i

    ifox

    07/02/2021, 1:29 PM
    in that case you're always in the modal, so images fields are not supported there
  • i

    ifox

    07/02/2021, 1:29 PM
    (yet) 😉
  • u

    user

    07/02/2021, 1:29 PM
    I tried to make both create and edit to be identical and seamless, without swapping to another section.
  • i

    ifox

    07/02/2021, 1:29 PM
    you can use
    skipCreateModal
  • i

    ifox

    07/02/2021, 1:29 PM
    both create and edit will happen on the form
  • u

    user

    07/02/2021, 1:30 PM
    Am I supposed to use that parameter as
    true
    inside the
    $defaultIndexOptions
    within the corresponding Controller?
  • p

    pboivin

    07/02/2021, 1:32 PM
    $indexOptions
  • p

    pboivin

    07/02/2021, 1:33 PM
    it will get merged with
    $defaultIndexOptions
    down the line
  • u

    user

    07/02/2021, 1:34 PM
    Right, but is this the indented behaviour then?
  • i

    ifox

    07/02/2021, 1:34 PM
    what is?
  • u

    user

    07/02/2021, 1:35 PM
    To have the form right behind the modal on the
    /create
    route
  • i

    ifox

    07/02/2021, 1:36 PM
    you wouldn't add any other field than the title/name in the create partial if you're using
    skipCreateModal
  • i

    ifox

    07/02/2021, 1:36 PM
    it's opening the modal on create so that the user can fill in the title/name since you're not supposed to put this as a field on the form itself
  • u

    user

    07/02/2021, 1:37 PM
    Right, makes sense.
  • u

    user

    07/02/2021, 1:38 PM
    One other thing though, is it possible to create dropdown menu's and group several modules inside a single menu on the admin panel?
  • u

    user

    07/02/2021, 1:39 PM
    Having more than
    n
    entries leads to a horizontal scrollbar which doesn't look that appealing.
  • i

    ifox

    07/02/2021, 1:39 PM
    not dropdowns, but there are 3 levels of navigation
  • u

    user

    07/02/2021, 1:44 PM
    I thought a simple prefix at
    admin.php
    would make it work, but it just made my route as undefined.
  • i

    ifox

    07/02/2021, 1:45 PM
    each navigation entry can take primary_navigation, which can take secondary_navigation. as long as your routes are nested using prefixes the same way
  • i

    ifox

    07/02/2021, 1:45 PM
    https://twill.io/docs/#navigation
  • u

    user

    07/02/2021, 1:57 PM
    RIght, I did set-it-up not to crash, yet I'm doing something wrong obviously. Am I supposed to create a new module for a navigation group?
  • u

    user

    07/02/2021, 1:58 PM
    Because as-is, nothing happens when I try and 'click' on the navigation group because I can't assign it a route, since a route would not exist 😄
  • u

    user

    07/02/2021, 1:58 PM
    I did pass it a
    module = false
    flag
  • u

    user

    07/02/2021, 1:58 PM
    Copy code
    'addons' => [
            'title' => 'Addons',
            'module' => false,
            //'route' => 'admin.addons',
            'primary_navigation' => [
                'testModule' => [
                    'title' => 'testModule',
                    'module' => true,
                ]
            ],
        ],
  • p

    pboivin

    07/02/2021, 2:02 PM
    Ah, I think I see what you are trying to do. You would like "Addons" to be a dummy nav item, just to group your other items into a subnav, is that it?
  • p

    pboivin

    07/02/2021, 2:05 PM
    You could use a blank custom CMS page or better yet, link "Addons" to the index of "testModule"
  • u

    user

    07/02/2021, 2:09 PM
    Right, I'd like to make a group which would hold other modules inside of it
  • p

    pboivin

    07/02/2021, 2:11 PM
    Cool! Quick example taken from the docs :
    Copy code
    'work' => [
            'title' => 'Work',
            'route' => 'admin.work.projects.index',
            'primary_navigation' => [
                'projects' => [
                    'title' => 'Projects',
                    'module' => true,
                ],
            ],
        ],
1...414243...484Latest