permalink
Good morning, everyone. I wanted to ask a question. I would like to have the possibility to add a button next to the permalink, where I could click on it and automatically copy that link. Is there something already available that does this? Thank you for your attention.
![No description](https://cdn.answeroverflow.com/1159849220090626119/image.png)
39 Replies
How can I get the full value from permalink?
this is not available as an option but we can certainly advise how to implement it or accept a contribution in core to do it
Thank you, Ifox. Do you know how to get full permalink value with slug?
How can i implement it?
I'm using twill 2
the full permalink value is there already since when you click that link it does open the full url. If you want to add a copy link functionality there you'd need to customize the Vue component inside Twill that is rendering the permalink
this is what I am trying to do, I cannot figure out how to duplicate the Vue component, where do I put my version of the Vue component? how do I tell Twill to render IT instead of the native/vendor component?
@LaravelOnline you can literally override them in your vendor folder and run twill:build, or follow this for custom components https://twillcms.com/guides/creating_custom_components_form_fields_and_blocks.html
Thank you, so when I run the build command... how does this ensure when I deploy the new files are used?
I guess, where does it put th eoverriden files?
you can go the pure override way, as in changing the actual file from twill, in your vendor folder, or use the resources path meant for custom components. It will copy them in the vendor folder before building
see, thats where you lose me
lol
the "pure override" way doesn't sound like it will keep my changes when we deploy unless I do something else
GitHub
twill/frontend/js/components at 3.x · area17/twill
Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. Chat with us on Discord at https://discord.gg/c...
well it will since twill:build will create new js assets in your public folder, which you can decide to push to your repo, or call twill:build during your deployment
ok
so, overriding them inside of the vedor dir and then run build
ill test that right now
I see what you mean though, if you literally override in your local vendor folder and build during deployment in CI for example, vendor modifications won't be there. But if you need that you can create your own composer or npm scripts that copies them from your own chosen folder to the vendor path
so, is there a hierarchy where twill will read from?
like, will it look at non vendor files for vue components?
or, basically, I can fork twill and use my fork
see the guides for custom Vue components. That's for creating your own components, as in ones that don't already exists in twill, like a new form field type. Those can be created under resources/assets/js/components and twill:build will include them. Now if what you're looking for is changing an existing component from twill, depending on which one, you may need to override the actual file, which you can do with the approach I shared above, or a fork, yes, that totally works too