- π·πΊRussia ilya.no
ilya.no β made their first commit to this issueβs fork.
- @ilyano opened merge request.
- Status changed to Needs review
almost 2 years ago 2:44pm 17 February 2023 - π·πΊRussia ilya.no
I've created MR with this feature. Initially I tried to use hook_block_access in toc_js_per_node.module file, but it doesn't work for node pages, rendered with layout builder β , so I added function
blockAccess
and it works fine. - Status changed to Needs work
over 1 year ago 8:32am 29 June 2023 - π«π·France flocondetoile Lyon
This feature should be configurable at the block level (default disabled to respect current behavior) with a checkbox added on the configuration form (support_toc_js_per_node for example) if the submodule is enabled.
Also
$value = $node->get('toc_js_active')->first()->get('value')->getValue();
could be simplified
$value = $node->get('toc_js_active')->value;
- First commit to issue fork.
- Status changed to Needs review
about 1 year ago 1:20pm 21 September 2023 Implemented the code entirely in the
toc_js_per_node
for better code modularity and to avoid redundant configurations if the site doesn't make use of the per node behaviour.As well as supporting two different use cases with the field:
- Hide the block if "display a table of contents" is check (since it might be rendered using the Node view display rather than the block).
- Hide/show exclusively using the value of "display a table of contents". So that it acts as a way of opting in/out of the rendering
Updated the logic for the "hide" behaviour, such that if there's been a value set on the content in some way, that should take precedence over the block settings, and be always hidden since its being rendered on the Node display level.
If we need other variations of logic, then we can always add more options to the list.
- π«π·France mably
FYI I think it has been implemented in the new 3.0.x-dev version.
- Status changed to Fixed
4 months ago 1:13pm 16 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.