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

    user

    05/17/2021, 3:39 AM
    Hi All. I was wondering what is the preferred way to build pages in Twill? Would each page be a capsule? Or a pages module? I think the module is overkill for client work as they should not really need to add pages directly especially when all pages are super custom (css) I see there is a homepage capsule in the twill github, but was wondering if there was anything to build that homepage as well as others in a similar way where each page gets their own form field
  • i

    ifox

    05/17/2021, 7:27 AM
    Hi @User! There are many ways to go about it, check out this thread which should help: https://github.com/area17/twill/issues/54#issuecomment-433988352
  • u

    user

    05/17/2021, 7:28 AM
    Great Thanks, will have a read 🙂
  • i

    ifox

    05/17/2021, 7:35 AM
    Also helpful: https://spectrum.chat/twill/help/pages-how-to-examples~18c5242c-80d8-4f16-b674-45a526ebcc7b?m=MTU4NDUyNTM3MDA2OA==
  • i

    ifox

    05/17/2021, 7:37 AM
    https://spectrum.chat/twill/help/overview-page~cf1c0e54-fdda-43ad-8c62-81a70d75113e?m=MTU1ODc5NzUwMzU5MA==
  • u

    user

    05/17/2021, 7:38 AM
    I think best approach is from the github discussions above and save a page template and do the logic based on that. Can make the template map to a blade layout too.
  • i

    ifox

    05/17/2021, 7:40 AM
    yep, we do that often. when the page is really bespoke in the CMS and has a lot of fields and/or relationships, we don't hesitate to use a dedicated table, like in the Homepage capsule, but if they share most of their fields, a model/table for multiple pages is totally fine.
  • u

    user

    05/17/2021, 7:41 AM
    nice 🙂 Agree here, Home pages are usually more bulky as well as landings etc. But privacy policy etc is simple enough for this approach
  • i

    ifox

    05/17/2021, 7:42 AM
    you can hide/disable functionality for your clients on a module too, if you still wanted to show a listing of pages instead of explicitly adding the form link to your nav
  • i

    ifox

    05/17/2021, 7:43 AM
    say you have a couple of "generic detail pages" for legal pages and so on, you can still have a listing of those in the CMS but disable create and delete.
  • u

    user

    05/17/2021, 7:44 AM
    yeah I noticed that already, we would disable create and delete for granular control. this way only a seeder/custom code can build a page. Clients shouldn't be allowed the option 😅
  • i

    ifox

    05/17/2021, 7:45 AM
    exactly
  • u

    user

    05/17/2021, 7:46 AM
    I noticed a bug on creating capsules
  • u

    user

    05/17/2021, 7:46 AM
    https://github.com/area17/twill/issues/905
  • u

    user

    05/17/2021, 7:46 AM
    Added in github here
  • u

    user

    05/17/2021, 7:46 AM
    I wonder if this is still a newish feature?
  • i

    ifox

    05/17/2021, 7:47 AM
    thanks! looking into it. so you responded yes to all except translations?
  • i

    ifox

    05/17/2021, 7:47 AM
    it is! just released it
  • u

    user

    05/17/2021, 7:48 AM
    Here is my ouput 🙂
  • u

    user

    05/17/2021, 7:49 AM
    I think this feature is a game changer 🙂 especially when the --require is done too
  • i

    ifox

    05/17/2021, 7:50 AM
    modules are more mature, though capsules rely on the module architecture, they are kind of an organizational pattern on top of them, to make them shareable/installable. The bug you have shouldn't be on a module, it seems to be only on capsules.
  • i

    ifox

    05/17/2021, 7:50 AM
    totally! Props to @antonioribeiro 🙂
  • u

    user

    05/17/2021, 7:52 AM
    Yeah this is correct, on a module it works well. on capsules it does not. Idea here is that we can install the pages capsule on multiple projects and update the capsule only (once it is tied to git naturally) modules work great, however a small update on one module means an update on all projects which can get messy if I start making money again lol
  • u

    user

    05/17/2021, 7:52 AM
    But I guess this is just teething for the new feature 😄
  • i

    ifox

    05/17/2021, 7:52 AM
    totally hear you, we have the same goal with them
  • u

    user

    05/17/2021, 7:53 AM
    Noice! I will fork the package and take a dive in, perhaps I may contribute 😄
  • i

    ifox

    05/17/2021, 7:53 AM
    awesome
  • u

    user

    05/17/2021, 10:55 AM
    Thank you @User
  • a

    AdamCord

    05/17/2021, 7:04 PM
    Hi so I've got an issue with repeaters working since upgrading to 2.2 . You can see from this image how a repeater now looks after the upgrade. The form elements within the repeater just don't appear.
  • i

    ifox

    05/17/2021, 7:05 PM
    Hi @AdamCord, yeah I see. Can you share the name of the blade file for that repeater, and the repeater item config array from twill.php?
12345...484Latest