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

    onepiece

    08/24/2022, 3:29 PM
    yes
  • i

    ifox

    08/24/2022, 3:29 PM
    are you doing anything in the repository of that module?
  • o

    onepiece

    08/24/2022, 3:31 PM
    I am setting up SEO, but it only appears in the Italian language, because English is not active
  • m

    mateoD

    08/26/2022, 8:02 AM
    hello, I want to create a button and place it here, what is the way to do this action
  • i

    ifox

    08/26/2022, 8:04 AM
    Hi @mateoD I'm not sure I understand your question since you already have it on your screenshot
  • i

    ifox

    08/26/2022, 8:05 AM
    Are you asking how to get that button to trigger something?
  • i

    ifox

    08/26/2022, 8:05 AM
    or maybe it isn't your screenshot and you want to replicate it
  • m

    mateoD

    08/26/2022, 8:05 AM
    in want to create custom buttom for example a button redirects me to another page
  • m

    mateoD

    08/26/2022, 8:06 AM
    do you undertand me now ?
  • i

    ifox

    08/26/2022, 8:08 AM
    well, not really. From your screenshot it looks like you already created that button. Now regarding having it do something like redirecting to another page, you can put a standard link on it instead of an action, let me check
  • i

    ifox

    08/26/2022, 8:09 AM
    Replace action by href
  • m

    mateoD

    08/26/2022, 8:10 AM
    is there any component like cache-button to change both the name of the button and the link ?
  • i

    ifox

    08/26/2022, 8:11 AM
    cache-button? I'm not following you
  • i

    ifox

    08/26/2022, 8:12 AM
    this is not a default component in Twill
  • i

    ifox

    08/26/2022, 8:12 AM
    Did you create a custom Twill UI component?
  • i

    ifox

    08/26/2022, 8:13 AM
    this should be a file in your codebase, Twill doesn't ship with such button
  • i

    ifox

    08/26/2022, 8:14 AM
    you can use
    a17-button
    directly, and that's what I thought you were doing at first, but looking close you definitely have custom components in your codebase
  • i

    ifox

    08/26/2022, 8:14 AM
    Look for CacheButton.vue or similar
  • k

    kalle

    08/26/2022, 8:49 AM
    You can check this example on how to implement custom action handler on frontend. @mateoD
  • m

    mateoD

    08/26/2022, 8:55 AM
    Thank you works for me
  • m

    mateoD

    08/26/2022, 1:36 PM
    hello again, I'm trying to get the previews for the blocks that are in a package built in twill but I can't find how to modify 'block_views_path' => 'site.blocks', in twill.php in order to receive block previews from the site/blocks and from the package
  • m

    mateoD

    08/26/2022, 1:36 PM
    can you help me with this ?
  • i

    ifox

    08/26/2022, 3:32 PM
    Hi @mateoD I think you'll need to map blocks to their respective views using
    twill.block_editor.block_views_mappings
  • i

    ifox

    08/26/2022, 3:33 PM
    views from your package should have a :: prefix to reference them
  • m

    mateoD

    08/26/2022, 3:38 PM
    I looked in the documentation for a more specific example, but I couldn't find it, can you help me with something more specific an example
  • i

    ifox

    08/26/2022, 3:40 PM
    Copy code
    'block_views_mappings' => [
        'text' => 'site.blocks.text',
        'quote' => 'package-namespace::blocks.quote'
    ]
  • i

    ifox

    08/26/2022, 3:41 PM
    I'd need to test this but this should be close
  • m

    mateoD

    08/26/2022, 3:58 PM
    this is not working, is there any other way to add it from twill.php without copying and placing it in resources/views/site/blocks in the project
  • i

    ifox

    08/26/2022, 4:02 PM
    How are you registering blocks from your package?
  • i

    ifox

    08/26/2022, 4:02 PM
    registerBlocksDirectory
    ?
1...379380381...484Latest