Frontend permalink on Twill form
# ❓questions
n
Hi, does twill have a solution to redirect to the item (blog or blog post or whatever may be) on the front page from the admin panel?
i
Hi @Nechalon I'm not sure I understand your question. What do you mean by redirect?
i think I got it, you want your permalink to show on the admin listing views, not just on the form of a specific item?
n
Hello @ifox, I mean when we are in the admin panel, and we're viewing a blog post for example, I would need to have a button that redirects me to the front page from the admin panel to that blog post.
I already have a button which redirects from specific blog posts to the admin panel to that specific blog post, thats what I want to do vice-versa.
i
don't you have slugs enabled on your module? when you do the url shows below the title in the admin panel
and if you don't you can return a
customPermalink
in your twill controller's
formData
n
I do have slugs, how would I redirect to the front page from there? Without having to manually go back to the front page and search for that blog post.
i

https://cdn.discordapp.com/attachments/1095677543337697280/1096084794309345381/image0.png

Isn't that link what you're looking for? I'm confused
n
oh, I think it is, which version has that? I'm on 2.3.0. and I dont have anything below the title
i
always had it since 1.0
when slugs are enabled, and a permalink field is in the create modal, which is by default
n
So it looks like that I dont have that set up.

https://cdn.discordapp.com/attachments/1095677543337697280/1096496369373556897/image.png

i
when you click on the pen icon, there's no other field than the title in the modal?
n
No, only the title and change language
i
does your model use HasSlug, and your repository use HandleSlugs?
n
Yes
i
did you override the create.blade.php file?
n
I think I dont have a create.blade.php file, only a form.blade.php
i
alright, so it should show. Are you returning anything from formData in your controller?
n
no, it has no formData
i
do you have rows in your _slugs table?
n
yes
i
any chance you could provide a reproduction repository? I'm really out of ideas beyond asking you to debug in your codebase
n
like, create a small git repo for this issue?
i
Yes so I can reproduce
n
ok, I'll see what I can do with that a bit later
Copy code
protected $indexOptions = [
        'permalink' => false,
    ];
Now the link shows after setting the permalink to
true
.
i
hehe yeah that makes sense