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

    dedli

    07/05/2022, 7:30 PM
    yes
  • d

    dedli

    07/05/2022, 7:31 PM
    I have one view just with renderBlocks and it is view for preview for couple modules, some works, some not
  • i

    ifox

    07/05/2022, 7:32 PM
    that's correct
  • i

    ifox

    07/05/2022, 7:32 PM
    seems like it is about a route you're outputting in that view
  • d

    dedli

    07/05/2022, 7:34 PM
    And I have another module witch preview works when it was in root, now I move it in navigation to submenu and preview have the same problems
  • i

    ifox

    07/05/2022, 7:35 PM
    are you building a route based on the current route in your layout?
  • d

    dedli

    07/05/2022, 7:39 PM
    Problem was that my admin routes was only inside prefix, now everything is work, Thanks! https://monosnap.com/file/VMebigZLB1rIeVnBOA15pOnPgv32Sc
  • i

    ifox

    07/05/2022, 8:21 PM
    you shouldn't really have to do this though, I'm confused why your preview would need modules available at the root, are you routing to admin modules within your frontend views?
  • d

    dedli

    07/06/2022, 8:13 AM
    Frontend view and view for preview is the same. I am not routing admin modules within my frontend views
  • d

    dedli

    07/06/2022, 8:19 AM
    Could somebody help me with duplicate function on last level pages in self-nested module https://monosnap.com/file/L5w1POQdDk8qaEYEzxj2k7YuQ4uqWA When I try duplicate I get error Missing required parameters
  • i

    ifox

    07/06/2022, 10:24 AM
    that sounds like a bug in Twill, can you report an issue on GitHub for this?
  • d

    dedli

    07/06/2022, 11:27 AM
    done https://github.com/area17/twill/issues/1730
  • s

    Sami

    07/06/2022, 11:41 AM
    Hello, is there a way to change the title field? I would like to make my module use a number to be the title If the
    titleFormKey
    and
    titleColumnKey
    is changed, it says 'Missing title'
  • i

    ifox

    07/06/2022, 11:42 AM
    @Sami for sure, you can use any column as the title actually
  • s

    Sami

    07/06/2022, 11:43 AM
    just edited the question. I don't know why it says missing title even if it's specified
  • s

    Sami

    07/06/2022, 11:46 AM
    when I type something in the field, it says correctly. But after refresh it's again "Missing title"
  • s

    Sami

    07/06/2022, 11:46 AM
    The
    number
    field should be the title
  • i

    ifox

    07/06/2022, 12:07 PM
    try to avoid using the same field twice
  • i

    ifox

    07/06/2022, 12:08 PM
    It seems like you also have it outside the modal, in the form, right?
  • i

    ifox

    07/06/2022, 12:08 PM
    does it work if you remove the one in the form view @Sami ?
  • s

    Sami

    07/06/2022, 12:10 PM
    Yes, it's in the form and also in create.blade.php. Deleted it but the problem is still there
  • i

    ifox

    07/06/2022, 12:11 PM
    can I see your create file? Does it work if you remove it?
  • i

    ifox

    07/06/2022, 12:11 PM
    the create file entirely i mean
  • s

    Sami

    07/06/2022, 12:13 PM
    No, it doesn't (removed it from the module folder) This is the complete content of
    create.blade.php
    Copy code
    php
    @formField('input', [
        'name' => $titleFormKey,
        'label' => 'Parcel number',
        'type' => 'number',
        'required' => true,
    ])
  • i

    ifox

    07/06/2022, 12:29 PM
    are translations enabled on this module?
  • s

    Sami

    07/06/2022, 1:25 PM
    no, they are not
  • d

    dedli

    07/06/2022, 1:41 PM
    I have documents module. In this module I have document (file), pablished date and multilang name (title) of resourse. How can I show in module link to this file for copy and paste link to other content? It can be inside richtext and other plain text. The best for me is to past this link as column inside list of docs https://monosnap.com/file/j656yG8jtvxKelxiMgxmOFeDmk8SJ9 if it is imporsible maybe it could be inside the document
  • d

    dedli

    07/06/2022, 1:41 PM
    https://monosnap.com/file/lNKUyJ21kg8s78emo7enpznEbnfwMS
  • s

    Sami

    07/06/2022, 1:53 PM
    I would probably try something like this in
    indexColumns
    (Admin\DocumentController)
    Copy code
    php
    'documentLink' => [
       'title' => 'Link',
       'field' => 'documentLinkIndex',
       'html' => true,
    ],
    and in your Document model:
    Copy code
    php
    public function getDocumentLinkIndexAttribute() {
      return Nette\Utils\Html::el('a')->href('<here comes the link>')->setText('<text of the link>')->toHtml();
    }
    I didn't test this but I use something similar (it just doesn't point to a file) EDIT: won't work well with self nested modules, see https://discord.com/channels/811936425858695198/811986149064441927/994256652758941696
  • d

    dedli

    07/06/2022, 2:03 PM
    Cool, thanks ) But I cannot understand how I can get my file link to put it here ?
1...356357358...484Latest