0
Welcome Guest! Login
0 items Join Now

SOLVED custom presets

    • xdwgg's Avatar
    • xdwgg
    • Rocketeer
    • Posts: 51
    • Thanks: 0

    SOLVED custom presets

    Posted 10 years 6 months ago
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: custom presets

    Posted 10 years 6 months ago
    • check

      template-options.xml
    • xdwgg's Avatar
    • xdwgg
    • Rocketeer
    • Posts: 51
    • Thanks: 0

    Re: custom presets

    Posted 10 years 6 months ago
    • hi,

      in the preset.ini, how do i include changing font and background colour? at the moment it change headerstyle, fontstyle and link color.

      i checked the template-options.xml, but not sure what should i do with the file in order to help me achieve in changing the colour.

      thanks
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: custom presets

    Posted 10 years 6 months ago
    • just check the options in that file



      <field name="headerstyle" type="selectbox" default="dark" label="HEADER_STYLE" isbodyclass="true" description="HEADER_STYLE_DESC" setbyurl="true" setinsession="true" setbysession="true" setincookie="true" setbycookie="true">
      <option value="dark">DARK</option>
      <option value="light">LIGHT</option>
      </field>

      and you have this in the presets

      'headerstyle' => 'dark',

      just look for other fields.
      Be aware you ant't do everything via options and presets.
      Some stuff needs to be done via CSS ...
    • xdwgg's Avatar
    • xdwgg
    • Rocketeer
    • Posts: 51
    • Thanks: 0

    Re: custom presets

    Posted 10 years 6 months ago
    • hi,

      actually what i am trying to do here is to change certain colour. as for example, i have the following css in my custom css file,
      .mid-module-title h2.title {
      font-size: 20px;
      padding-bottom: 0px;
      text-align: center;
      background-color: #b0c4de;
      text-shadow: 0px 0px;
      }

      how do i change the value of background-color via preset? i want to allow the visitor to choose the colour. as for example,
      /?preset=blue will change the background-color to #333399
      /?preset=green will change to #33cc33

      thanks
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: custom presets

    Posted 10 years 6 months ago
    • you need to an option in the template for that.
      You need set up a few things to get the variable you set in the preset to CSS.
      Seems to be a crazy way to do that ... why do want to do that via a preset?
      Looks like overkill to me?
    • xdwgg's Avatar
    • xdwgg
    • Rocketeer
    • Posts: 51
    • Thanks: 0

    Re: custom presets

    Posted 10 years 6 months ago
    • i'm thingking of preset since via preset, we can change the link colour, so i might be able to do others too. till you point me to the tamplate-options.xml. :D

      i'm not sure if i can achieve it by other way.

      any easier way?
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: custom presets

    Posted 10 years 6 months ago
    • xdwgg's Avatar
    • xdwgg
    • Rocketeer
    • Posts: 51
    • Thanks: 0

    Re: custom presets

    Posted 10 years 6 months ago
    • seems like a long process :)

      thanks. will take a look and try :)
    • xdwgg's Avatar
    • xdwgg
    • Rocketeer
    • Posts: 51
    • Thanks: 0

    Re: custom presets

    Posted 10 years 6 months ago
    • hi Henning,

      in my old joomla 1.5, using rt_syndicate which also gantry based i have this

      This image is hidden for guests.
      Please log in or register to see it.




      where in the gantry-config.php i have the following, the sample,:
             'preset6' => array (
                  'name' => 'Preset 6',
      			'page-background' => '#C8C7BD',
      			'logo-background' => '#396C78',
      			'logo-text' => '#FFFFFF',
      			'logo-style' => '3',
      			'logo-overlay' => 'dark',
      			'logo-link' => '#CF3F1B',
      			'header-background' => '#2E1142',
      			'header-text' => '#ffffff',
      			'header-image' => '8',
      			'header-overlay' => 'dark',
      			'header-link' => '#FFFFFF',
      			'submenu-background' => '#D3D2C7',
      			'submenu-text' => '#2D0F42',
      			'submenu-overlay' => 'dark',
      			'submenu-link' => '#2D0F42',
      			'body-background' => '#E5E4D9',
      			'body-text' => '#444',
      			'body-overlay' => 'light',
      			'body-link' => '#2D7484',
      			'footer-background' => '#C8C7BD',
      			'footer-text' => '#666666',
      			'footer-overlay' => 'light',
      			'footer-link' => '#2D7484',
      			'alert-background' => '#C6D2D4',
      			'alert-text' => '#333333',
      			'readonstyle' => 'button',
      			'articlestyle' => 'title7',
      			'articledetails' => 'layout2',
      			'headerwidth' => 'full',
      			'footerwidth' => 'full',
      			'webfonts-enabled' => '0',
      			'webfonts-source' => 'google',
      			'font-family' => 'syndicate'
              ),

      and sample from the 1.5 templateDetails.xml
      			<param name="footer" type="groupedparams" label="FOOTER_CHOOSER" description="FOOTER_CHOOSER_DESC">
      				<param name="background" type="colorchooser" default="#f1f1f1" position="left" label="BG" setinsession="true" setbysession="true" setincookie="true" setbycookie="true"/>
      				<param name="text" type="colorchooser" default="#666666" position="left" label="TEXT" setinsession="true" setbysession="true" setincookie="true" setbycookie="true"/>
      				<param name="overlay" type="selectbox" default="light" position="right" class="rokradios" label="OVERLAY" setinsession="true" setbysession="true" setincookie="true" setbycookie="true" setclassbytag="rt-footerbar">
      	                <option value="light">LIGHT</option>
      	                <option value="dark">DARK</option>
      	            </param>
      				<param name="link" type="colorchooser" default="#A50C0F" position="right" label="LINK" setinsession="true" setbysession="true" setincookie="true" setbycookie="true"/>
      			</param>

      seems like it's a lot of preset that we can control. how do we have that in the current version? i'm using gantry framework 4.

Time to create page: 0.059 seconds