We moved to new unified forum!

Please post all new support queries in our New Forum.

T3 Community Discussion & Support

Let's build the best free Joomla template framework, together!
  1. robjen
  2. Sherlock Holmes
  3. General Discussion
  4. Friday, 01 August 2014
  5.  Subscribe via email
Hello,

I am trying to add a parameter to ThemeMagic but am experiencing the following problems:

1 - The language strings are not working
2 - entering a color in the default colour background field doesn't work

The code I'm using in each file is shown below. Hopefully, you can tell me what the problem is.


Have added these variables in THEME folder variables.less file

@navbar-default-bg: lighten(@brand-primary, 20%);
@navbar-default-link-active-bg: darken(@navbar-default-bg, 6.5%);



Have added the following code to the THEME template.less file

// Navbar
// ----------------------------------------
.navbar-default {
background-color: @navbar-default-bg;
border-color: @navbar-default-border;
}
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
color: @navbar-default-link-active-color;
background-color: @navbar-default-link-active-bg;
}



Have added this parameter in the thememagic.xml file

<fieldset name="navbar_params" label="T3_TM_NAVBAR">

<field name="t3-navbar-default-bg" type="color" class="t3tm-color"
label="T3_TM_VARS_NAVBAR_DEFAULT_BG_LABEL"
description="T3_TM_VARS_NAVBAR_DEFAULT_BG_DESC" />

<field name="t3-navbar-default-link-active-bg" type="color" class="t3tm-color"
label="T3_TM_VARS_NAVBAR_DEFAULT_LINK_ACTIVE_BG_LABEL"
description="T3_TM_VARS_NAVBAR_DEFAULT_LINK_ACTIVE_BG_DESC" />

</fieldset>



Have added the following in the en_GB_.tpl_t3_bs3_blank.ini file

; Theme Magic

; NAVBAR
T3_TM_NAVBAR ="Navbar"

T3_TM_VARS_NAVBAR_DEFAULT_BG_LABEL ="Navbar Background Color"
T3_TM_VARS_NAVBAR_DEFAULT_BG_DESC ="Navbar Background Color"

T3_TM_VARS_NAVBAR_DEFAULT_LINK_ACTIVE_BG_LABEL ="Navbar Active Link Color"
T3_TM_VARS_NAVBAR_DEFAULT_LINK_ACTIVE_BG_DESC ="Navbar Active Link Color"



The attached image Is what I'm seeing in ThemeMagic.

Hope you can help.



Regards,
robjen
Attachments (1)
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
0
Votes
Undo
Hi,

Did you compile LESS to CSS?

For the language, please add to the "your_site_root_folder\language\en-GB\en_GB_.tpl_t3_bs3_blank.ini" file.

Gardner.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
Hello Gardner,

Thanks for the quick reply.

Yes, everything was compiled from LESS to CSS.

I added my parameters to the language folder in the template folder - if you wanted to distribute the template that is the obvious place.

However, I did add the parameter to the root language folder as you said - and as you can see it worked as it should. Thank you.

Unfortunately, adding a colour in the Navbar Background Color field does not change the colour. See the attached image.

So something else is still not right.

Would appreciate you looking again at the code above to see if you can see what the problem might be.


Regards,
robjen
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
Hi,

Please try to replace the code:

<fieldset name="navbar_params" label="T3_TM_NAVBAR">

<field name="t3-navbar-default-bg" type="color" class="t3tm-color"
label="T3_TM_VARS_NAVBAR_DEFAULT_BG_LABEL"
description="T3_TM_VARS_NAVBAR_DEFAULT_BG_DESC" />

<field name="t3-navbar-default-link-active-bg" type="color" class="t3tm-color"
label="T3_TM_VARS_NAVBAR_DEFAULT_LINK_ACTIVE_BG_LABEL"
description="T3_TM_VARS_NAVBAR_DEFAULT_LINK_ACTIVE_BG_DESC" />

</fieldset>


With:

<fieldset name="navbar_params" label="T3_TM_NAVBAR">

<field name="navbar-default-bg" type="color" class="t3tm-color"
label="T3_TM_VARS_NAVBAR_DEFAULT_BG_LABEL"
description="T3_TM_VARS_NAVBAR_DEFAULT_BG_DESC" />

<field name="navbar-default-link-active-bg" type="color" class="t3tm-color"
label="T3_TM_VARS_NAVBAR_DEFAULT_LINK_ACTIVE_BG_LABEL"
description="T3_TM_VARS_NAVBAR_DEFAULT_LINK_ACTIVE_BG_DESC" />

</fieldset>


Gardner.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 3
Accepted Answer Pending Moderation
0
Votes
Undo
Hello Gardner,

Unfortunately, removing "t3-" from both field names made no difference. Still cannot change colour of navbar using ThemeMagic. Any other suggestions.

Would also like to know why language strings for the template need to be placed into the language file of the root folder rather that in the language file of the template itself.

Language strings would be missing for your added template parameters If anyone was using your template as a stand alone distribution.

Just curious.


Regards,
robjen
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 4
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Robjen,

Here is my answer for your questions:

Q: Unfortunately, removing "t3-" from both field names made no difference. Still cannot change colour of navbar using ThemeMagic. Any other suggestions.
A: I need time to test your code to see how it works

Q: Would also like to know why language strings for the template need to be placed into the language file of the root folder rather that in the language file of the template itself.
A: It's the way Joomla work. You still see the language files in the template folder but it's not the file that Joomla get to display. It gets languages files in the language file of the root folder or administrator/language.

Gardner.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 5
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.