-
-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Configurable Post Routes #171
[WIP] Configurable Post Routes #171
Conversation
@tomschlick I really like this feature. If you're confident we can address any upgrade issues with the upgrade process you're working on, then I've got no problem merging this in. Quick question: The Settings page in the admin section has really begun to house all the blog config options. Since I want us to also be able to cater to the non-Laravel/new developers, is there a way we can provide this option from the GUI? Perhaps specifying the path in the settings form? I think if we can provide a blog where 99% of the configuration can be done from the GUI, it'll look far less intimidating to someone who just tries it out. Does that make sense? |
We could definitely stash the config in the db and have that trigger what fields are required... the issue is with the blog post routes itself. Maybe this is a good case for a catchall? Not sure what the solution is there... any ideas? |
And yeah I'll outline my thoughts on the upgrade process in #95 later tonight or tomorrow |
I like that, storing the config options in the db. What were you referring to as a catch all? A route? Haven't thought of it before, what would that look like? @tomschlick |
So the catch-all would wait until all the other routes are checked and then the router would call some custom method like That seems like the way to go but we would have to basically duplicate the routing logic to check for those in the custom method. I'm looking into how a few other Laravel based CMSs have done it. |
@tomschlick That sounds like it'd be good. Haven't ever seen that done before, but it sounds like the right direction for this. |
The best way I can think to do it right now is to add a From there it would be trivial to do a db lookup on the posts table during a request. The alternative is to somehow parse the URL against the structure in the config such as Thoughts? |
@tomschlick Never even thought about that approach, but I like it. That seems like a good way to progress with this. You've got my thumbs up for it. |
Ok, I'll look into amending this over the next day to use what we just talked about 👍 |
Awesome, thanks for your work on this. Really appreciate your contribution, you're making it a better app with each commit. 👍 |
No problem! I can really see this taking off as the defacto laravel blogging standard. Some of the improvements I have suggested related to #95 could even allow it to be attached to an existing laravel application much like spark can be... but thats another ticket for another day 😉 |
Thanks for the kind words! I really look forward to what the community can do with this! |
@tomschlick Did you want me to merge this PR in right away? Or was there anything else you were planning on doing with it or something else? |
Just hold off until I can amend the PR with those changes. I think those are a much better solution than what I currently have here |
error in run |
Sorry for the delay in this. Might have some time over the next week or two to finish it up. |
@tomschlick Sounds good, looking forward to it! |
@tomschlick As a quick note, when you're looking into this I was wondering if you could look into another thing I wanted to tweak with all this. Basically, I want to remove the |
Yeah the more I think about it, the more I'm inclined to say there should Those can be versioned so previous urls redirect to the current ones. And Thoughts? On Wed, Nov 16, 2016 at 2:29 PM Todd Austin notifications@github.com
|
@tomschlick I like that idea a lot. Never thought about doing it that way, but if you're able to make that a feature, I'm all for it 100%. |
Yeah that would also allow you to manage things like a pages module in the future. |
Perfect! So you think it's pretty feasible to add that feature? |
@austintoddj maybe we could also modify the |
@Naoray I think sticking with |
@tomschlick I believe a PR like this can now be migrated or re-created over in Easel, since that's the core code now. I'd still love to see this implemented, so if you want to close this out and attempt it over there I'd be very grateful! |
Yeah go ahead and close it. I'll reopen over there sometime soon.
On Wed, Nov 30, 2016 at 9:21 PM Todd Austin ***@***.***> wrote:
@tomschlick <https://github.com/tomschlick> I believe a PR like this can
now be migrated or re-created over in Easel
<https://github.com/cnvs/easel>, since that's the core code now. I'd
still love to see this implemented, so if you want to close this out and
attempt it over there I'd be very grateful!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#171 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAESKFB_kUPF5OdJLLp0ZDN-hs6SrXg3ks5rDi8ogaJpZM4KADRw>
.
--
Sent from my iPhone
|
As described in #167, this PR allows you to configure how post URLs are structured. With this you can do so in 2 steps.
The first is to change which url parameters are required in
config/blog.php
. You can do so by uncommenting the parameters you want in your url.Second you'll want to change the
blog.post.show
route to include those parameters:From there it should just work.
Let me know what you think about this approach. Obviously there are some issues with upgrading in the future but I think we can address those using the approach Laravel Spark is taking as we talked about in #95
fixes #167