Closed (fixed)
Project:
Bootstrap
Version:
8.x-3.x-dev
Component:
Code
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 May 2017 at 23:15 UTC
Updated:
13 Jan 2018 at 04:32 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
casivaagustin commentedComment #3
bandanasharma commentedComment #4
bandanasharma commented#2 patch is apply successfully. I have attached the after and before attachment.
Comment #5
markhalliwellSince this is a variable (machine name), then it should use the
|clean_classfilter as well when adding it.Comment #6
markhalliwell@bandanasharma, taking screenshots of code changes isn't necessary and honestly, a little confusing; that is what the patch is for.
Screenshots are typically only useful for changes that affect the UI/site itself.
Comment #7
casivaagustin commentedHere goes a patch for the comment #6.
Comment #8
casivaagustin commentedComment #9
casivaagustin commentedBump: Ready for Review
Comment #10
gerzenstl commentedThe last patch looks good.
Comment #11
sylus commentedI might have missed something but I see that the following code was directly removed? Was that by design?
Comment #12
markhalliwellThere was a lot of markup/line changes between #2 and #7. I just asked that the
|clean_classfilter was applied. I don't think the level of complexity in #7 is needed.Comment #13
casivaagustin commentedHere goes a new patch, like #2 but adding the clean_class
Thanks for the feedback
Comment #14
casivaagustin commentedComment #15
markhalliwellNever override existing variables in templates. This can cause unintended and unforeseen issues when attempting to extend or override in sub-themes.
The filter should be used like the following (without spaces around the pipe):
<ul{{ attributes.addClass('dropdown-menu', menu_name|clean_class) }}>Comment #16
casivaagustin commentedD'oh!, Here it goes without override the variable.
Thanks for the feedback
Comment #17
casivaagustin commentedComment #18
casivaagustin commentedOne more time, I miss out something from the comment.
Comment #20
markhalliwellComment #22
markhalliwellJust an FYI: #2936370: Consolidate menu macro in main template
This adds a
menu--prefix to the menu name.