0
Welcome Guest! Login
0 items Join Now

ROCKETTHEME IS CLOSING ON JUNE 30, 2025. As a thank-you to our community, enjoy 50% off all themes with the promo code THANKYOU before we shut down. Read our Farewell Blog Post for more details.

Problem applying presets from the dropdown

    • Boradan's Avatar
    • Boradan
    • Jr. Rocketeer
    • Posts: 42
    • Thanks: 0

    Problem applying presets from the dropdown

    Posted 12 years 9 months ago
    • Having an odd issue with a joomla template I created using the gantry framework.
      When I select 'show styles' and click on the preset image, the style settings are applied to all my options in the style panel.
      IF however, I select the style from the dropdpown on the style panel, it doesnt apply the style settings to the options in the style panel.

      Probably related to this is that when I select a style from the preset Images, I get the icons showing what settings have changed, but when I save the settings, these dont go away and I need to refresh the page manually for them to disappear.

      What could be the root of these problems?
      I can change ALL of the settings I have added to the style panel and they work perfectly, so there doesnt seem to be an issue with my coding of each individual option. All the added options have their 'defaults' set in the gantry.config.php and all have been called in the styledeclarations.php.

      Cant figure this one out at all :(
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: Problem applying presets from the dropdown

    Posted 12 years 9 months ago
    • Hi, the presets are different than the style dropdown. All the style drop down selects is which css file the template will use - style1.css, style2.css ECT - it doesn't affect the backend settings at all. The presets are collections of backend settings that you can store and recall.

      The backend settings do not actually exist in any file other than the database. Instead their current values are passed through the styledeclaration file and rendered as an inline style in the document.

      Basically, they are two different switches for two different functions. It wouldn't make much sense to have two different switches that did the same thing. Which one you use depends on what you are trying to do.
    • The difficult we do immediately, the impossible takes a little longer.
    • Boradan's Avatar
    • Boradan
    • Jr. Rocketeer
    • Posts: 42
    • Thanks: 0

    Re: Problem applying presets from the dropdown

    Posted 12 years 9 months ago
    • ah.... gotcha.
      What about the numbers and icons for the things that have been changed still showing after you change style - even after you save your changes- or is that normal?

      By that I mean the 'style' tab showing '29' in orange, along with bullet points at all the things that have been changed.

      I also have one other issue. I have set in the templateoptions.xml that the default setting for the top_pos should be 2 POS_COUNT, force POS on and set to 8,4 for the spacing. This isnt applying , though it sort of is. I get the force Pos on, and I get the POS_COUNT to be set to 2, but it isnt applying that. there are still 6 options showing, so it cant set the slider to 8,4 and is defaulting to 6,6.

      Is this known, or have I screwed up the templateoptions.xml code?

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


      the code I have used in the options is:
      <fields name="top" type="position" label="TOP_POS">
       
                     <field name="layout" type="positions" default="8,4" label="">
       
                          <schemas>1,2,3,4,5,6</schemas>
       
                          <words>2,3,4,5,6,7,8,9,10</words>
       
                     </field>
       
                     <field name="showall" type="toggle" default="1" label="FORCE_POS"/>
       
                     <field name="showmax" type="showmax" default="2" label="POS_COUNT"/>
       
                </fields>

      I want to force the top to have only 2 positiions and for those to be 8,4 is it possible to make this hidden in any way and for the user to not be able to change it (apart from re-coding)
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: Problem applying presets from the dropdown

    Posted 12 years 9 months ago
    • Hi, it looks like your are seeing the language strings "TOP_POS" - for example - should say "Top Position". This could indicate a permission issue or some bad code that you may have introduced through editing. It shouldn't be like that, it's not a bug either. This could also account for some of the other issues you might be having.

      I'm not sure about the change number icons, I'm not seeing that issue either. If it goes away after you refresh it's not really much to be concerned about. That functionality exists to show you what has changed, or what is different in duplicate template overrides.

      The force position is working fine. There are 6 positions available, that is why there are 6 listed above it - so you can change to 1 - 6 at any time. You could remove the positions from the schemas code so it just has 1,2 - that would only give you 2 options to choose from - you would have to have both 1 and 2 in order to create two positions.
    • The difficult we do immediately, the impossible takes a little longer.
    • Boradan's Avatar
    • Boradan
    • Jr. Rocketeer
    • Posts: 42
    • Thanks: 0

    Re: Problem applying presets from the dropdown

    Posted 12 years 9 months ago
    • got the issue with the string showing fixed... missed a comma somewhere ;)

      The FORCE_POS is working, its the POS_COUNT thats giving me the issue as far as placement goes. As you can see from the above screenshot, the '2' is showing in the POS_COUNT, and the 2 is selected in the number list, but it doesnt actually APPLY until you re-select '2' from the pos count. With the '2' selected from the default settings for POS_COUNT, the numbers 3-6 shouldnt be showing at all.
      This is why it cant set the 8|4 positioning - the framework still thinks there are 6 positions and cant apply 8,4 to that.......
    • Last Edit: 12 years 9 months ago by Boradan.
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: Problem applying presets from the dropdown

    Posted 12 years 9 months ago
    • Hi, it doesn't work like that. The 6 numbers will always show - unless you remove them from the schema code. Whether you select 1, 2, 3, 4, ECT - all 6 numbers will always show regardless of which setting you make. Say you wanted to change from 2 positions to 3 later on - you can just click 3 - because it's still there. If the numbers were gone how would you change it later? I think you're just misunderstanding how it works.

      The framework can't think anything - all it can do is read the settings you have made. It will not see 6 positions unless you have 6 modules published in that position - top-a, top-b, top-c ECT. If you only have 2 modules - it will only see 2. If you have force position with a set number, it should see that number.

      I have no idea if you've done something wrong in the code, I can't see your website, I don't know all the details of how you have set this up. If you would like to post your link I can take a look. All I really know is that you're having an issue - I have no idea if it's a problem with Gantry, user error, or configuration issue. You'll have to let me know what's going on.
    • The difficult we do immediately, the impossible takes a little longer.
    • Boradan's Avatar
    • Boradan
    • Jr. Rocketeer
    • Posts: 42
    • Thanks: 0

    Re: Problem applying presets from the dropdown

    Posted 12 years 9 months ago
    • I think theres a misunderstanding here ;)
      The template is working fine. You can see it in use at http://www.symbiotic-ubiquity.co.uk
      if you look at the layout link, you can also see that the 'custom styling' I have incorporated into the template style panel also works.
      The only problem is when the settings are reset to 'default', or when the template is first installed.
      The screenshot I showed above is how the 'Top Positions' looks when you reset to defaults, or do a fresh install of the template. The default settings in template-options.xml are set to
      <fields name="top" type="position" label="TOP_POS">
                     <field name="layout" type="positions" default="8,4" label="">
                          <schemas>1,2,3,4,5,6</schemas>
                          <words>2,3,4,5,6,7,8,9,10</words>
                     </field>
                     <field name="showall" type="toggle" default="1" label="FORCE_POS"/>
                     <field name="showmax" type="showmax" default="2" label="POS_COUNT"/>
                </fields>
      This isnt being applied, as the positions are coming up as 6|6, so the logo is in the wrong position (the logo is set to top-b and the fontsizer to top-a).
      Even though the number '2' has been underscored to show it is selected, its still impossible to get it to 8|4 positioning until you manually reselect '2' from the 'POS_COUNT' dropdown. At that point, the numbers 3-6 disappear and the logo can be positioned correctly using 8|4.

      I hope I explained it a bit more clearly that time.
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: Problem applying presets from the dropdown

    Posted 12 years 9 months ago
    • Okay, I'm not really seeing an issue here. What you're saying is you have to make the settings as you want them and save for them to work - which is normal.

      The default positions, as seen in the code are 8,4 - which is what comes up when you install or reset to the default settings - as those are the defaults. Defaults are different than Values. Values are stored in the database, Defaults are not. The only place the defaults exist is in this XML file. When you click reset defaults, it reads these values and loads them in the backend. They do not get stored in the database until you save them, explaining why the changes don't happen until you click buttons and save - the actual values do not exist until you set them.

      This usually isn't an issue, as people generally do not wish to use the defaults and it doesn't really matter what they are set to until you create some modules and need to position them. It's not going to automatically do what you want in most cases.

      If you are trying to get these exact settings to load up in the backend try value="8,4" - that defines the actual value and tells the db what to change the settings to. default="8,4" doesn't do anything to the database, it's just a starting point.

      Generally, you're going to have to set everything the way you want it. The whole point of Gantry is so you can customize it to do what you want and build custom themes. This is why there are not set values defined out of the box. There aren't settings we can put in that will apply for everyone, so we make it as flexible as possible to allow you to adapt to the situation at hand.
    • The difficult we do immediately, the impossible takes a little longer.
    • Boradan's Avatar
    • Boradan
    • Jr. Rocketeer
    • Posts: 42
    • Thanks: 0

    Re: Problem applying presets from the dropdown

    Posted 12 years 9 months ago
    • Thanks again for your prompt responses. I didnt realise it was the way Gantry operates. I thought it was a problem with the way I was coding it - I assumed I had broken something ;)
      Gotta say, its been fun figuring out how to create a template with Gantry. SOOOOO much a better way of doing it than with Artisteer. Man, but I HATED that one....

      Your assistance has been greatly appreciated. Now, all that remains for me to do is set up another 2 styles and put in some more options. SHOULD go smoothly from here.
      I guess saying that just put a monster curse on me :shock:
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: Problem applying presets from the dropdown

    Posted 12 years 9 months ago
    • Hi, no worries. It just took me a bit to figure out what you were asking.

      This default setting thing is a source of confusion for many, just remember that the default setting is relatively meaningless until you save it - then it becomes a value in the database. In some of our themes the default is 4,4,4,4 - which will not mean much unless you have 4 modules in that position - if the positions are empty, the settings won't apply anyway. In that case, Gantry sees no modules, the position does not have a value assigned and the default is used - once there is a value assigned the default is no longer necessary. Defaults are just a jumping off point meant to give you an idea of what you could do.

      When working with Joomla, Gantry, Wordpress or whatever - clicking buttons, refreshing, resaving ECT - can often solve little issues. None of this stuff is perfect, sometimes you have to tinker a bit to get it to do what you want. Just my experience. Let us know if you have more questions.
    • The difficult we do immediately, the impossible takes a little longer.

Time to create page: 0.056 seconds