Collection nodes are visible only to the author node and users with permission "bypass node access"
- File
capacitype_collection/capacitype_collection.module
Hookfunction capacitype_collection_node_access()
responsible for implementing feature.
Feature : Allow sharing of Collection content
Provides a publicly viewable url for a collection node.
At event Author clicks at a collection share link, shows a modal dialog popup "Share" thats lists:
- Link to page
All lists items are "Call to action" links having the publicly viewable url of a collection node.
- File
capacitype_collection/capacitype_collection.install
Hookfunction capacitype_collection_schema()
, adds backend table holding publicly viewable url parts (nid,uid,pass,etc..) - File
capacitype_collection/capacitype_collection.routing.yml
declares custom routecapacitype_collection.public_view
aka the publicly viewable url for a collection node. - File
capacitype_collection/capacitype_collection.module
Hookfunction capacitype_collection_node_presave()
, responsible for adding a publicly viewable url database record. - File
capacitype_collection/capacitype_collection.drush.inc
Hookdrush_capacitype_collection_c5cc_create_public_collection_urls()
,adds script drush c5cc-create-public-collection-urls, this script backfills any collection nodes without a publicly viewable url. - File
capacitype_collection/src/Controller/ShareCollectionController
methodShareCollectionController::publicAccess
handles access control for routecapacitype_collection.public_view
- File
capacitype_collection/src/Controller/ShareCollectionController
methodShareCollectionController::publicView
view handler for routecapacitype_collection.public_view
- File
themes/custom/capacitype/templates/content/node--collection--full.html.twig
sectionshareable collection integration
adds modal dialog javascripts & sharelink to template. - File
themes/custom/capacitype/capacitype.theme
functioncapacitype_preprocess_node
sectionshareable collection integration
adds variableshareable_collection_link
for template use innode--collection--full.html.twig