-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add HTML id of item_id to paragraphs-item.tpl.php template #167
Comments
@laryn - I've added a PR that mirrors the way |
This looks good to me. This can be useful for things like adding links to hashes. |
@yorkshire-pudding @herbdool What are your thoughts on whether we should preprocess and use backdrop_html_id for this? Probably the core node implementation should do that too -- there are certainly cases I could see where a paragraph or node could be displayed more than once on a page, perhaps with different view modes, in a block, etc., and the current implementation would result in multiple identical |
@laryn |
Does the "apenty" module fulfill this need, it has the "heading" type where you can create an anchor. |
There is a need for this in paragraphs without installing additional modules |
@laryn - I have updated this PR to use Tested by embedding the node again on the page in a block. |
@laryn - a reminder that there is an updated PR awaiting your review |
Thanks for your work here @yorkshire-pudding -- merged. |
Nodes have an id that relates to the node id (
nid
)It would be good, for the purposes of being able to navigate to a paragraph via an anchor link, to have the same in the template for
paragraphs_item
. For example.Where
37
is theitem_id
of the paragraphs item.I tried to do this in a
paragraphs-item.tpl.php
file in my theme, and it worked, but I couldn't then do any other paragraphs-item templates to override more specific paragraph types.The text was updated successfully, but these errors were encountered: