-
Type: Bug Report
-
Status: Needs Review
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: 5.3.0
-
Component/s: CMS
-
Labels:None
-
Change Log Group:Added
-
Change Log Message:Allow specifying placeholder text/html for Content Blocks.
-
Story Points:2
-
Copy Issue Key:
-
Patch Instructions:
Commits rPLS18677 and rPLS18732:
- use "placeholder_label" as parameter name instead "default_label"
- place new code right in "ContentBlock" method instead of "_transformContentBlockData" method
Plan
- add "PlaceholderLabel" column (varchar(255) NOT NULL DEFAULT '') to the "PageContent" DB table and unit
- add the "$placeholder_label" parameter to the "PageHelper::createNewContentBlock" method
- in that method store value passed through that new parameter to newly created "PlaceholderLabel" DB column
- in the "st:ContentBlock" tag
- assign value of "placeholder_label" parameter to a "$placeholder_label" temp variable (would have empty value, when "placeholder_label" tag parameter was not given)
- pass on value of "$placeholder_label" variable to the call of "PageHelper::createNewContentBlock" method
- after content block is created/loaded compare it's "PlaceholderLabel" field value with "$placeholder_label" variable value and if they differ put new value in content block record and call "Update()" method on content block ($content variable)
- when content block value is empty (on current language) AND $placeholder_label variable isn't empty AND we're in "Content Mode" then return phrase with that label translation as if it was content block text in DB
- validate, that with "Content Revision Control" enabled the value of PlaceholderLabel column isn't lost when new revision is created by copying content of another revision
- in the "content:OnBeforeItemUpdate" if the value of "PlaceholderLabel" field isn't empty AND current text in content block matches phrase with that label translation set text of content block to empty string
- implemented in
-
[Request, 45 lines] D127 INP-1474 - Add "placeholder_label" parameter to "st:ContentBlock" tag
- mentioned in
-
Page Loading...