Skip to content
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

Custom Components and Sitemap plugin #456

Closed
phpMagpie opened this issue Jul 19, 2019 · 2 comments
Closed

Custom Components and Sitemap plugin #456

phpMagpie opened this issue Jul 19, 2019 · 2 comments
Labels
Status: Abandoned Has not seen any activity in at least a month, used to prompt stakeholders to action third party Not related to the repository, it must be handled by a third party instead Type: Question Issue that is actually just a question

Comments

@phpMagpie
Copy link

We've taken on an existing website which is using rainlab's blog and sitemap plugins.

It looks like some custom development has been done registering a custom BlogPostComponent::class => 'blogPostDetail' and BlogListingComponent::class => 'blogPostListing'.

This is stopping the Post::getMenuTypeInfo($type) and Post::resolveMenuItem($item, $url, $theme) from working as they are expecting different component names, which is in turn stopping 'All blog posts' from working in the sitemap.

Any idea how I get these custom components working nicely with the sitemap plugin?

@LukeTowers
Copy link
Contributor

@phpMagpie you could try setting those component's aliases to blogPost and blogPosts (not sure that'd work though), or you can extend the Post model with your own model, override those methods to look for your custom components, and then add your own event listeners (https://github.com/rainlab/blog-plugin/blob/master/Plugin.php#L154-L170) to resolve using your custom Post model by subscribing to the events with a higher priority (https://octobercms.com/docs/services/events#subscribing-priority)

@LukeTowers LukeTowers added third party Not related to the repository, it must be handled by a third party instead Type: Question Issue that is actually just a question labels Jul 19, 2019
@bennothommo bennothommo added the Status: Abandoned Has not seen any activity in at least a month, used to prompt stakeholders to action label Oct 15, 2019
@bennothommo
Copy link
Contributor

Closing as it has been over a month since any activity on this occurred and we are trying to figure out what issues are still relevant. If this is still something that you would like to see through to fruition please respond and we can get the ball rolling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Abandoned Has not seen any activity in at least a month, used to prompt stakeholders to action third party Not related to the repository, it must be handled by a third party instead Type: Question Issue that is actually just a question
Projects
None yet
Development

No branches or pull requests

3 participants