0
Welcome Guest! Login
0 items Join Now

custom presets

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

    Re: custom presets

    Posted 10 years 6 months ago
    • Syndicate is not using LESS-files.
      So you compare apples and oranges really ...
      You can check the styledeclaration.php of the features folder of that template.
      Since that is J1,5 the Syntax wont work in 2.5
      But one one thing is the same if you you want your OWN options you need to add them YOURSELF as I said above.
      You can add as many options in the template as you want but the more options you add the slower the template will get.
      I still don't get why you want to use presets? Do you want to chnage the color everyday?
    • Last Edit: 10 years 6 months ago by Henning.
    • xdwgg's Avatar
    • xdwgg
    • Rocketeer
    • Posts: 51
    • Thanks: 0

    Re: custom presets

    Posted 10 years 6 months ago
    • the bosses want it that way :(
      different user like the different colour, they said.

      anyway thanks for the explaination.

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

    Re: custom presets

    Posted 10 years 6 months ago
    • knowing this facts,
      maybe i will only try to add option to change the font

      best of luck to me. haha
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: custom presets

    Posted 10 years 6 months ago
    • why don't you just add one or two rules of css to do that?
    • xdwgg's Avatar
    • xdwgg
    • Rocketeer
    • Posts: 51
    • Thanks: 0

    Re: custom presets

    Posted 10 years 6 months ago
    • what i mean is when user click the link of ?presets=blue, text will become blue. if they click ?presets=red, text will become red.

      if i change the text colour via custom css, it would not changed if user change the preset, it will remain. am i understanding this correctly?
    • xdwgg's Avatar
    • xdwgg
    • Rocketeer
    • Posts: 51
    • Thanks: 0

    Re: custom presets

    Posted 10 years 6 months ago
    • Hi Henning,

      refering to www.gantry-framework.org/documentation/j...ze/custom_presets.md

      there is cssstyle option in the preset array (not available in my gantry-config.php),
          'presets' => array(
              'preset1' => array(
                  'name' => 'Preset 1',
                  'cssstyle' => 'style1',
                  'linkcolor' => '#2698de',
                  'font-family' => 's:helvetica'
          ),
                  'preset2' => array(
                  'name' => 'Preset 2',
                  'cssstyle' => 'style2',
                  'linkcolor' => '#ff0000',
                  'font-family' => 's:helvetica'
          ),

      does it mean we can set preset1 to load css from file custom-a.css and preset2 to load from file custom-b.css?
    • Last Edit: 10 years 6 months ago by xdwgg.
    • xdwgg's Avatar
    • xdwgg
    • Rocketeer
    • Posts: 51
    • Thanks: 0

    Re: 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
    • You can set whatever you want that tutorial is a bit out off date.
      You need to use field but the principle is the same.
      Looking at the questions that you ask I suggest to look for soemthing simple like page-classes/body-classes.

      The presets per se don't add CSS stuff.
      The values in the preset-file define only what you have prepared in template-options.xml
    • Last Edit: 10 years 6 months ago by Henning.
    • 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
    • i am trying to follow the steps to understand more, it works :)

      i added into template-options.xml the following
      	<field name="titlecol" type="selectbox" default="default" label="Title Colour" description="" setbyurl="true" setinsession="true" setbysession="true" setincookie="true" setbycookie="true" isbodyclass="true">
      <option value="default">Size default</option>
      <option value="blue">Size blue</option>
      <option value="red">Size red</option>
      </field>

      inside the gantry-custom.css, i added the following:
      .titlecol-blue .mid-module-title h2.title {
      font-size: 20px;
      padding-bottom: 0px;
      text-align: center;
      background-color: #0000ff;
      text-shadow: 0px 0px;
      }
      
      .titlecol-red .mid-module-title h2.title {
      font-size: 20px;
      padding-bottom: 0px;
      text-align: center;
      background-color: #ff0000;
      text-shadow: 0px 0px;
      }

      i'm actually changing background colour of title in a module and that module is set with a module class suffix of the following code:
      .mid-module-title h2.title {
      font-size: 20px;
      padding-bottom: 0px;
      text-align: center;
      background-color: #b0c4de;
      text-shadow: 0px 0px;
      }

      access the page with ?titlecol=red (because we have setbyurl="true"), the background colour changed to red.

      i learned that the setbyurl have higher priority compared to module class suffix.

      thanks a lot Henning!

      and just wondering, is the cssstyle still supported in joomla3/gantry4? i did try to follow the tutorial, but nothing happened.

      thanks
    • Last Edit: 10 years 6 months ago by xdwgg.

Time to create page: 0.059 seconds