Open Maay opened 8 years ago
@mpowaga any help?
@Maay the meteor admin routes are structured so: "/admin/{collectionName}/edit" for edit and "/admin/{collectionName}/ for view_all. From your pathFor, it looks like you left out the 's' in Posts collection name
@snamoah it's not the issue here because I'm using "Posts" here as an example, it has different name in my code. I think I need to use <a target="_blank" href="{{pathFor route='/admin/Posts/:_id/edit' }} "> EDIT </a>
but it doesn't work as well with error pathFor couldn't find a route named "/admin/Posts/:_id/edit"
@Maay have you tried specifying the url directly without pathFor; as in <a href="/admin/Posts/{{id}}/edit"> EDIT </a>
@snamoah yes, I've started from that. I think it doesn't subscribe or something like that.
@Maay can you paste the error you're getting with the initial code... I'm still not getting you
@snamoah I'm not getting any errors, what I get is the "loading" state of admin interface, that I showed in the post. It looks like it can't get the elements. You can get the same error if you'll open the "edit" page on the admin, then change your code, meteor will refresh the page and here it is - the loading page. At least in my case.
On my main page I have this logic next to the element so that I could fastly go to the edit section
It gives me the link like
http://localhost:3000/admin/Post/oEzftd8y49DZfxQFj/edit
which is the same that I get from inside the admin interface (on the "View All" section). But unless I've opened that element before from the "View All" section, that link from outside the admin section would give me allways loading state:Same happens when I'm on the edit page and meteor refreshes the page after I'm updating any code.
What is the proper way to link to the edit page? Thank you.