XWiki Platform
  1. XWiki Platform
  2. XWIKI-13160

Cannot change most of the @xwiki-* variables in a Flamingo Theme

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 8.0-milestone-2
    • Fix Version/s: 8.4-rc-1, 7.4.6
    • Component/s: Flamingo Theme
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      • Create a layoutExtraVars.vm in flamingo skin folder
      • Add this variable
         #set($displayPageHeader = true)
        
      • Go to the FlamingoThemes.Charcoal and in the Advanced @lessCode section write
        @xwiki-page-header-bg-color: #3E7CBC;
        
      • If you hit preview the change is displayed, see preview.png
      • But if you save the Flamingo Theme, the change is not applied (tried also with a restart);
      1. before.png
        111 kB
      2. expected.png
        112 kB
      3. preview.png
        295 kB

        Issue Links

          Activity

          Hide
          Ecaterina Moraru (Valica) added a comment - - edited

          In order to change the background-color I did the following:

          since the call is in layout.less

          #headerglobal {
            background: @xwiki-page-header-bg-color @xwiki-page-header-bg-image @xwiki-page-header-bg-position;
          }
          

          and since in variableInit.vm we have

           @xwiki-page-header-bg-color:          $theme.pageHeaderBackgroundColor;
          

          if you want to have another color you will need to add in @lesscode something like:

          #headerglobal {
            background: #3E7CBC;
          }
          

          in order to overwrite the skin.

          I don't know what the problem is, since the preview is ok.

          Show
          Ecaterina Moraru (Valica) added a comment - - edited In order to change the background-color I did the following: since the call is in layout.less #headerglobal { background: @xwiki-page-header-bg-color @xwiki-page-header-bg-image @xwiki-page-header-bg-position; } and since in variableInit.vm we have @xwiki-page-header-bg-color: $theme.pageHeaderBackgroundColor; if you want to have another color you will need to add in @lesscode something like: #headerglobal { background: #3E7CBC; } in order to overwrite the skin. I don't know what the problem is, since the preview is ok.
          Hide
          Ecaterina Moraru (Valica) added a comment -

          Another idea would be to be able to set this variable from the Editor, see XWIKI-11717

          Show
          Ecaterina Moraru (Valica) added a comment - Another idea would be to be able to set this variable from the Editor, see XWIKI-11717
          Hide
          Guillaume Delhumeau added a comment -

          Introduced by XWIKI-12672. XWIKI-11717 could fix this issue, indeed.

          Show
          Guillaume Delhumeau added a comment - Introduced by XWIKI-12672 . XWIKI-11717 could fix this issue, indeed.
          Hide
          Ecaterina Moraru (Valica) added a comment -

          The title of this issue "Cannot change @xwiki-page-header-bg-color value" is a bit misleading, since it could be interpreted as "Find a way to change the value (maybe in the Editor + I also suggested it)", while it was more reported as a bug "If I want to change the value of the variable, the change is not applied".

          Show
          Ecaterina Moraru (Valica) added a comment - The title of this issue "Cannot change @xwiki-page-header-bg-color value" is a bit misleading, since it could be interpreted as "Find a way to change the value (maybe in the Editor + I also suggested it)", while it was more reported as a bug "If I want to change the value of the variable, the change is not applied".
          Hide
          Guillaume Delhumeau added a comment -

          Actually it concern the following list of variables:

          @xwiki-page-content-bg
          @xwiki-border-color
          @xwiki-panel-header-bg
          @xwiki-panel-header-text
          @xwiki-background-secondary-color
          @xwiki-page-header-bg-color
          @xwiki-page-header-bg-image
          @xwiki-page-header-bg-position
          
          Show
          Guillaume Delhumeau added a comment - Actually it concern the following list of variables: @xwiki-page-content-bg @xwiki-border-color @xwiki-panel-header-bg @xwiki-panel-header-text @xwiki-background-secondary-color @xwiki-page-header-bg-color @xwiki-page-header-bg-image @xwiki-page-header-bg-position
          Hide
          Guillaume Delhumeau added a comment -

          Fixed it without the need of XWIKI-11717.

          Show
          Guillaume Delhumeau added a comment - Fixed it without the need of XWIKI-11717 .

            People

            • Assignee:
              Guillaume Delhumeau
              Reporter:
              Ecaterina Moraru (Valica)
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: