Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-1474

Add "placeholder_label" parameter to "st:ContentBlock" tag

    XMLWordPrintable

    Details

    • 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

      Description

      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

      1. add "PlaceholderLabel" column (varchar(255) NOT NULL DEFAULT '') to the "PageContent" DB table and unit
      2. add the "$placeholder_label" parameter to the "PageHelper::createNewContentBlock" method
      3. in that method store value passed through that new parameter to newly created "PlaceholderLabel" DB column
      4. 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
      5. 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
      6. 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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Erik Snarski [Intechnic]
                Reviewer:
                Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: