0
Welcome Guest! Login
0 items Join Now

Fields in Template Options

  • Fields in Template Options

    Posted 12 years 3 months ago
    • I have added a couple of options that I wish to place next to one another in the style panel in Gantry control...

      in template options I added the fields and they appear one atop the other which is fine and they work...


      <field name="searchBorder" type="colorchooser" default="#43889f" label="SEARCH_BORDER" setinsession="true"
      setbysession="true" setincookie="true" setbycookie="true"/>


      <field name="menuButtonBg" type="colorchooser" default="#3990a3" label="MENU_BUTTON_BG" setinsession="true"
      setbysession="true" setincookie="true" setbycookie="true"/>

      <field name="menuText" type="colorchooser" default="#ffffff" label="MENU_TEXT" setinsession="true"
      setbysession="true" setincookie="true" setbycookie="true"/>

      I added of course the array in index.... 'menuButtonBg'=>$gantry->get('menuButtonBg', '#3990a3'),

      for each... what I need is that they appear in the style panel in Gantry control not atop one another rather next to each other... side by side... the elements aren't, as you can see connected to one another such that I can successfully "chain" them.

      I saw this post.... www.rockettheme.com/forum/index.php?f=33...73276&rb_v=viewtopic

      and I think he wish same result but he using styledeclaration feature... I assume because he assing many more options than I... I only wish to add these few and a couple more and have them all appear horizontal on one line in the panel.

      Any ideas?
    • David Goode's Avatar
    • David Goode
    • Preeminent Rocketeer
    • Posts: 17058
    • Thanks: 890
    • Web Designer and Host

    Re: Fields in Template Options

    Posted 12 years 3 months ago
    • Hi there,

      The simplest thing to do is find other settings where there is more than one item in a row and see how they are constructed.

      For example if you look at Font Settings you see the Font Family and Font Size selectors. The code for those are...
      <fields name="font" type="chain" label="FONT_SETTINGS" description="FONT_SETTINGS_DESC">
                     <field name="family" type="fonts" default="s:helvetica" primary="helvetica" label="FONT_FAMILY" isbodyclass="true" setbyurl="true" setinsession="true" setbysession="true" setincookie="true" setbycookie="true">
                          <option value="geneva">Geneva</option>
                          <option value="georgia">Georgia</option>
                          <option value="helvetica">Helvetica</option>
                          <option value="lucida">Lucida</option>
                          <option value="optima">Optima</option>
                          <option value="palatino">Palatino</option>
                          <option value="trebuchet">Trebuchet</option>
                     </field>
                     <field name="size" type="hidden" default="default" setbyurl="true"/>
                     <field name="size-is" type="selectbox" default="default" label="FONT_SIZE" setinsession="true"
                           setbysession="true" setincookie="true" setbycookie="true" isbodyclass="true">
                           <option value="xsmall">F_XSMALL</option>
                           <option value="small">F_SMALL</option>
                           <option value="default">F_DEFAULT</option>
                           <option value="large">F_LARGE</option>
                           <option value="xlarge">F_XLARGE</option>
                      </field>
                 </fields>
      As you can see there is a <fields></fields that wraps the normal <field></field> tags. It also contains the type="chain".

      If this resolves your problem then please edit your first post in this thread by adding SOLVED at the start of the title and then select the green tick icon. This lets the moderators know that it can be moved to the solved section.

      Thanks for your cooperation :)

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information
  • Re: Fields in Template Options

    Posted 12 years 3 months ago
    • Well, actually I tried that but with fields name font that goes to a div called .font, my options are from various divs like ajaxsearch and gf-menu etc.... when I group the 4 field options into fields name="(anything)" the functions in the array are no longer working. They do however with chain put them how I wish.... columns is also interesting.... but the fields name what should that be when my options have to do with a div ajaxsearchBg and gf-menu.li? Would I have to declare this in style declaration? If so how?

Time to create page: 0.048 seconds