How do I need to specify a language override for my template in order for Joomla! to use it?
It's specific language tags for the COM_STORELOCATOR component.
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.tpl_XXX.ini</language>
</languages>
Option 1
The file with overrides should be located here:
/language/overrides/en-GB.override.ini
You can manage the template overrides directly from the Joomla! backend.
Go to Extensions > Language Manager > Overrides
Option 2
Check the solution proposed by "mgirardis" in the Joomla! Forums:
You create the folder: [TEMPLATE_NAME]/language/overrides
and put inside it the file containing all the desired overrides:
zz-ZZ.override.ini where zz-ZZ is the language you wish to override.
Then in templateDetails.xml you add (inside the tags <languages>; I'm
putting this tag here only to illustrate the idea):
<languages>
<language tag="overrides">language/overrides/zz-ZZ.override.ini</language>
</languages>
I wouldn't override something like that. I usually add a component-specific prefix to my language files to avoid conflicts. For instance, the title for you would be:
echo JTEXT::_("SL_TITLE");
Related
I just started using Docfx and set up some basic conceptual documentation. Now I want to make some adjustments to the theme (company logo, perhaps some font changes, etc.) Minor stuff.
The official documentation only gives a high-level description of how to create a new template. I've never used a templating language before, so I'd like to avoid that for now if possible.
My question is: how can I make small adjustments to the default theme, like some CSS changes and perhaps adding external resources (like font awesome)?
Do I have to create an entire template (or a part of it) or can I include a CSS file somehow? The documentation mentions a theme option but so far I've found no examples or existing themes to learn from.
A mere link to a project that uses a custom theme or template would already be very helpful. The docfx repo has a docfx.website.themes folder and the default template is also in there I believe, but I couldn't really figure out which files I would have to provide to roll my own.
Export template:
Run docfx template export default, then you'll see default template in _exported_templates\default
Change themes in default template, e.g:
Adding external resource: modify styles\head.tmpl.partial
CSS change: modify styles\docfx.css or styles\main.css
Use customized template:
Run docfx -t _exported_templates\default, which will use your customized template!
NOTE: It is possible that DocFX updates its embedded templates when releasing new version. So please make sure to re-export the template if you overwrite or dependent on that template in your custom template.
What file would I need to edit to change (overide) the Joomla 3.3 on Centos default category blog view ?
Im using the Yoo theme Katana theme ...
Ta,
What you have to do is 1st override the category blog view view in your template. Because editing core files are not preferred.
Here’s a simple tutorial to override the layout of the ‘category blog’ view.
First of all we need to create the override folder /templates/current_template/html/com_content/category/
Paste and copy the blog_item.php file located in /components/com_content/views/category/tmpl into the override folder we previously created.
edit the blog_item.php file as you need.
Default category blog listing path is:
{JoomlaSite}/components/com_content/views/category/tmpl/blog.php
That includes other related templates respectively:
{JoomlaSite}/components/com_content/views/category/tmpl/blog_item.php
{JoomlaSite}/components/com_content/views/category/tmpl/blog_links.php
{JoomlaSite}/components/com_content/views/category/tmpl/blog_children.php
In Joomla 3.3.x versions category blog layout is already overridden by default beez3 template, so you need to refer a copy from beez3 templates for latest changes(if any). Path for that is;
{JoomlaSite}/templates/beez3/html/com_content/category/blog.php
{JoomlaSite}/templates/beez3/html/com_content/category/blog_item.php
{JoomlaSite}/templates/beez3/html/com_content/category/blog_links.php
{JoomlaSite}/templates/beez3/html/com_content/category/blog_children.php
You can use this files to override respectively, based on which type of change is required to your current need. You can copy & paste respective files to your current theme's folder like this;
{JoomlaSite}/templates/{Your_Current_Theme}/html/com_content/category/blog.php
Replace {Your_Current_Theme} with your template folder name.
I have made some changes to my custom module's xml manifest file and also added new entries in the module's language file but the new language entries are not translated when I edit the module.
In the language file, I added a new entry such as:
MOD_MY_MODULE_LABEL="This is a label"
When I edit the module, all I can see is MOD_MY_MODULE_LABEL. I've refreshed the cache for the module from the Extension Manager but it's not reading the new changes. Am I missing something?
Once your template has been "installed", the language file in your template is no longer referenced. You need to open the following INI files:
/[ROOT]/language/en-GB/en-GB.tpl_[-=YourTemplate=-].ini
/[ROOT]/language/en-GB/en-GB.tpl_[-=YourTemplate=-].sys.ini
(Where [ROOT] is the dir you installed Joomla, and [-=YourTemplate=-] is the name you assigned your language files, they will be named exactly to the language files in your template, but in a different location for the Joomla system)
If you decide to take your template to another website (like another client) remember to grab those INIs and swap them out in your template folder
The proper method is like follows,
In your module xml file should have language file like follows.
<languages>
<language tag="en-GB">en-GB.mod_latesttweets.ini</language>
<language tag="en-GB">en-GB.mod_latesttweets.sys.ini</language>
</languages>
and your fields like.
<field name="consumer_key" type="text" default="" label="MOD_TWITTER_CONSUMER_KEY" description="MOD_TWITTER_CONSUMER_KEY_DESC" size="60"/>
Then module folder have these two files.
en-GB.mod_latesttweets.ini
en-GB.mod_latesttweets.sys.ini
Inside language file like below.
MOD_TWITTER_CONSUMER_KEY = "Consumer Key"
Then Joomla will place this file in the proper language folder while you install the module.
Once you have installed the module and needs to change the language labels. Should be change inside Joomla language folder file.
You can download a sample module from this link and check the structure.
The issue look like your language file does not exists.
Hope its helps..
I can't find a answer for this, I want to know what is the best way to have an alternative layouts for articles in Joomla.
If I understand you correctly you are looking for a way to create additional Alternative Layouts for articles. Under parameter tab "Article Options":
If that is the case, its very close to the other provided answers here. Its just that you got to rename the copied default.php file to something else. If you rename it to custom.php it will end up with the text "custom" like the image above.
Here goes my shot for a step by step:
Find the default layout file(s). You could use the ones provided by the com_content component. They can be found at components/com_content/views/article/tmpl. Copy both default.php and default_links.php.
Now you need to rename and copy the file(s) into a template. The target template can be any of the installed templates. Using beez_20 the new path for the copied file(s) should be templates/beez_20/html/com_content/article/custom.php and templates/beez_20/html/com_content/article/custom_links.php.
Goto to edit article using the backend. Expand the Article Options tab and find Alternative Layout. Select your new layout.
Your template might already provide a article override. If so, you might want to use the files of that template instead (instead of the ones in step 1). So if you are using beez_20, you could copy templates/beez_20/html/com_content/article/default.php and templates/beez_20/html/com_content/article/default_links.php.
Helpful links:
Using Joomla’s Template and Layout Override
Layout overrides in Joomla 1.6
The best way to do this would either to install another content component - such as k2 which is highly customizable. Or any other content component on JED.
Alternatively you could create a template override on the existing Joomla Template. This is preferable to editing the files directly in com_content component as the template overrides will never be overwritten whereas the core files will be in any Joomla Updates. I should add, hopefully unnecessarily that this requires Joomla 1.5, 1.6, 1.7, 2.5 or 3.0 (although this is still in beta as of present). So make sure you're not using 1.0.
To create an alternative layout for the built in articles component the best way to do it is probably to create a template over-ride.
See this article on docs.joomla.org on "How to override the output from the Joomla! core"
Creating an alternative for an article layout is pretty straight forward. You can achieve this by using the core layout override with your published template(s).
First you want to get/copy the core article layout file:
components/com_content/views/article/tmpl/default.php
Then place it into your published template:
templates/YOURTEMPLATE/html/com_content/article/default.php
If the template you are using doesn't have the html folder, then you will have to create that folder and each folder to make that path correct.
Once you have this in place, all you need to do is make changes to that default.php file you have just place in the template and that is it!
i have develop a component in joomla 1.5 and make .xml file to install
in my .xml i have administrator menu like
<administration><menu>COM_MY_COMP</menu>
<submenu>
<menu task="display">COM_MY_COMP_MENU1</menu>
<menu task="additem">COM_MY_COMP_MENU2</menu>
</submenu>
and in language file i set the item like
COM_MY_COMP="My Component"
COM_MY_COMP_MENU1="Dispaly"
COM_MY_COMP_MENU2="Dispaly2"
it working on other item but not on administrator menu , it is not convert to COM_MY_COMP to My Component
i use joomla 1.5.
You can't just add the language file to the folder. You need to re-install the component WITH the language file. Here is what you need to add to the xml.
<languages folder="language-admin">
<language tag="en-GB">en-GB/en-GB.com_yourcomponent.ini</language>
<language tag="en-GB">en-GB/en-GB.com_yourcomponent.menu.ini</language>
</languages>
Also may I say that if its the menu you are trying to translate, you will need a separate language file like en-GB.com_yourcomponent.menu.ini
and below is how it should look.
COM_YOURCOMPONENT="Your Component"
COM_YOURCOMPONENT.CONTROL_PANEL="Control Panel"
Hope this helps
You have to put your translation in this folder:
/administrator/language/en-GB/