-
Notifications
You must be signed in to change notification settings - Fork 8
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
Provide Create content links #28
Comments
@olafgrabienski I've created an example in the Prepopulate modules wiki https://github.com/backdrop-contrib/prepopulate/wiki But there's more: file: book.views.inc section:
So I used a view: CONTEXTUAL FILTERS
FIELDS
which let me use the following Prepopulate expression further in an additional field:
This sets the groups association and the parents mlid to a book child content. |
@olafgrabienski I agree this would be a very useful feature to have "out of the box" (thanks @schoenid for providing alternative ways). In the videos you included, this feature is provided (through a Panels' "content type") by entityreference_prepopulate. I removed this feature when I ported entityreference_prepopulate since Backdrop doesn't have Panels, but I will start an issue there and will start an adaptation of this feature so that it's available as a block through Layouts. When that's ready I'll close this issue. |
Issue created in entityreference_prepopulate |
I have allready created a PR a few weeks ago for the books mlid in file: book.views.inc ... |
@olafgrabienski, I just added the "Create content links" to Backdrop OG as a block (it was a Panels component in D7). Please see #119 (the latest commit there). Can you please test? Now it's possible to add this "Create content links" block to a normal Backdrop layout. The block creates a direct link to the add form to add content to the group node being viewed. Important: in order for this to work properly Entity Reference Prepopulate must be enabled. Otherwise the group will not be pre-selected in the group reference field in the form. See this video tutorial. |
Thank you very much, @argiepiano ! After applying the changes to my test site, I was able to add the block "Content create links", and the the provided links work as expected. Actually, I wasn't sure if I a particular layout for groups is required. I had already enabled Entityreference Prepopulate and configured the field. So, after not finding the block in the "Add block" dialog of the Default layout, I added a layout with node context and the new visibility condition "Node is an OG group". Then I was able to add the block. |
That shouldn't be necessary. I think you did not see the block because of the location of og_block_info (it's in an inc file). I'll move it to the main module. This should solve the problem. |
I've moved the hook_block_info implementation to the main module. This should solve the block not being visible. Closing this now as this functionality has been merged. |
@argiepiano I've tested this (using the OG Beta release), and the block is still not visible in the "Add block" dialog of the Default layout. One idea: in |
Reopening so that we can take a look at this again. Thanks @olafgrabienski |
As shown in http://modulesunraveled.com/organic-groups-7x-2x/organic-groups-layout and the following chapter, there is an option to provide Create content links like
node/add/post?og_group_ref=GROUP-ID
on group nodes, so that content is automatically posted to the group where you click the Create content link.The Create content links must be configured in Organic Groups but they are provided by the Entityreference Prepopulate module which so far isn't available for Backdrop. Should we port Entityreference Prepopulate, or are there better ways to provide these links, e.g. using https://github.com/backdrop-contrib/prepopulate, or as enhancement of the OG module itself?
In my opinion, this type of Create content links is quite useful, if not practically necessary, in most use-cases.
The text was updated successfully, but these errors were encountered: