Menu

Theme customisation ("test-red") - setting background color of top part

2022-09-12
2022-09-14
  • Tim Hoffman

    Tim Hoffman - 2022-09-12

    Hi

    I am working through some theme customisation for itop 3.0.x

    I am trying to chnage the background of "ibo-navigation-menu--top-part--background-color"

    I have tried following https://www.itophub.io/wiki/page?id=3_0_0%3Acustomization%3Atheme#how_to_create_a_new_theme

    I unable to user : the example for test theme "test-red"

    The example indicates

    <theme id="test-red" _delta="define"></theme>

    Using _delta="define"  results in an error as I would expect as the theme already exists
    

    ""rct-login-custom-content": /theme[test-red] at line 17 could not be added : already exists in /itop_design/branding/themes/theme[test-red] at line 1861"

    I tried adding _delta="define " at the variable level (merge at the theme level)
    
    <branding>
    <themes>
      <theme id="test-red" _delta="merge">
        <variables>
          <variable id="ibo-navigation-menu--top-part--background-color" _delta="define" >#8E8F9E</variable>
        </variables>
      </theme>
    </themes>
    

    Whilst this compiles it has no effect.
    Changing to _delta="redefine" outputs an error, saying the variable doesn't exist - which sort of makes sense.
    

    I am clearly missing something in my mental model of how this works.

    Looking for some inspiration ;-)

    Thanks

    Tim

     
  • Stephen Abello

    Stephen Abello - 2022-09-13

    Hi Tim,

    You should use _delta="must_exist", or no _delta at all for <theme> as it's only used for reconcilliation in this case.

    However your should make sur that your module has itop-structure as depency so it'll ensure the theme exists before you alter it.

    Regards
    Stephen

     
  • Tim Hoffman

    Tim Hoffman - 2022-09-14

    Awesome, thanks, that was exactly my problem.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.