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

    Harings Rob

    08/19/2022, 8:39 AM
    @Shiftless are you seeding the content? Or what do you mean with PageFactory?
  • s

    Shiftless

    08/19/2022, 9:26 AM
    yes i was trying to seed a pages for tests
  • i

    ifox

    08/19/2022, 10:01 AM
    @Shiftless if you want to have twill behaviors when seeding, you need to use the module repository, not the model directly
  • s

    Shiftless

    08/19/2022, 10:08 AM
    I was expecting this. means factories are not possible?
  • k

    kalle

    08/19/2022, 10:10 AM
    By 'pages', you mean module records with slugs or?
  • s

    Shiftless

    08/19/2022, 10:11 AM
    yes it has slugs, translations, revisions.
  • k

    kalle

    08/19/2022, 10:11 AM
    You can check this example if this helps you.
  • k

    kalle

    08/19/2022, 10:12 AM
    But Im not sure if all features are testable like that
  • l

    Levente Farkas

    08/19/2022, 10:12 AM
    Hi! I'm newbie in twill. I have a question. Do I need create the blade files to the default blocks or twill has a default implementation?
  • k

    kalle

    08/19/2022, 10:13 AM
    Also good inspiration would be Twill tests.
  • k

    kalle

    08/19/2022, 10:28 AM
    Twill has 2 default blocks registered in config file which you can also use in your editor.
    image
    and
    text
    https://github.com/area17/twill/blob/2.x/config/blocks.php#L22 Block source is here https://github.com/area17/twill/tree/2.x/src/Commands/stubs/blocks
  • l

    Levente Farkas

    08/19/2022, 10:30 AM
    Oh, yeah. I forgot... I mean the site blades not the admin blades.
  • k

    kalle

    08/19/2022, 10:33 AM
    If you need to create custom blocks for your module, you can follow Twill documentation. All of that is explained there. https://twill.io/docs/block-editor/ Or I didnt understand your question completly. Please be more specific if that's the case. 🙂
  • i

    ifox

    08/19/2022, 11:21 AM
    I think @Levente Farkas is talking about frontend rendering of the blocks content
  • i

    ifox

    08/19/2022, 11:21 AM
    there are no defaults for that
  • k

    kalle

    08/19/2022, 11:22 AM
    Thanks, I get it now, its more clear to me what he wants to achive haha
  • l

    Levente Farkas

    08/19/2022, 11:23 AM
    Yes, exactly. Sorry for the mistake.
  • h

    Harings Rob

    08/19/2022, 11:27 AM
    In twill 3.x you can generate dummy preview files, but you still need to update them to your needs.
  • k

    KUS

    08/19/2022, 4:48 PM
    Some days ago I discovered Twill, and I must say, Wow ! I am in a process to experiment with 3.0 beta to try to build my needed cases. One piece is not easy. For the project I need the role translator: this role can edit text or textarea inputs in one language only, but "nothing else". Is this doable with configuration and templates or does it require deep re-engineering?
  • i

    ifox

    08/19/2022, 5:45 PM
    Hi @KUS! very valid use case and I think achievable by config/templates customisation. we'll be happy to support
  • i

    ifox

    08/19/2022, 5:46 PM
    you could even build modules dedicated to translators on top of your "full" modules
  • k

    kalle

    08/19/2022, 5:55 PM
    Just want to give my 2 cents here. I've had similiar task in past, which is on 2.8.x version of Twill. On that version module approach was not ideal, since with enabled multilang I couldnt enable specific langs, only all were available. So I went with custom role, with specific option on user profile (admin view) to select languages which he can translate. So with custom pages I was able implement translation dashboard, and on module (admin view) I had an browser which selects specific user which is assigned to that translation task. I really hope that there is some easier way in 3.x with the new permission system to achive this. 🙂
  • k

    KUS

    08/19/2022, 5:59 PM
    Ok, you believe customisation will do the job.
  • i

    ifox

    08/19/2022, 6:01 PM
    yeah like @kalle said it's not necessarily easy per se but it is possible.
  • i

    ifox

    08/19/2022, 6:01 PM
    @kalle i would love to look at this closer with you if you don't mind
  • k

    kalle

    08/19/2022, 6:03 PM
    I could share that snippets with you, but full project I cant. Company project. 😦
  • k

    KUS

    08/19/2022, 6:04 PM
    If you could share some snippets it would be great
  • k

    KUS

    08/19/2022, 6:07 PM
    Maybe I make a package out of it
  • k

    kalle

    08/19/2022, 6:08 PM
    I have already described logic behind it. Which part you are you interested in?
  • k

    KUS

    08/19/2022, 6:10 PM
    I read three parts from your explanation: 1) make some input fields accessible and other not based on gate/roles 2) put users into roles 3) generate the roles
    k
    • 2
    • 13
1...376377378...484Latest