0
Welcome Guest! Login
0 items Join Now

How to add editable CSS properties to the backend?

    • LiEs's Avatar
    • LiEs
    • Sr. Rocketeer
    • Posts: 238
    • Thanks: 0

    How to add editable CSS properties to the backend?

    Posted 12 years 10 months ago
    • I want to make logo width to be editable in the back-end instead having to manually editing the css file. I added this to tempalte-options.xml
                 <field name="logowidth" type="text" default="300px" label="LOGO_WIDTH" class="text-long"/>
       
      Now I'm not sure what to do next :oops: . I figured I edit the styledeclartion.php file so I added
      this line
             $css .= '#rt-logo {background-color:'.$gantry->get('accentcolor').'; width:'.$gantry->get('logowidth').'px;}';
       
      but that doesn't work.

      It does work if I edit the logo.php file and add this
                     <a href="<?php echo $gantry->baseUrl; ?>" id="rt-logo" style="width: <?php echo $this->get('logowidth'); ?>"><?php echo $this->get('logocode'); ?></a>
       
      , but this create inline style which I don't want.

      Any leads?

Time to create page: 0.050 seconds