Noticed the template variable %%GLOBAL_HeadFonts%% in HTMLHead.html in the Bigcommerce Blueprint theme as well as other themes.
What I don't understand is where the value of this variable can be set in the Bigcommerce admin interface / back-end. I notice that theme authors seem to stick additional fonts directly into HTMLHead.html before/after %%GLOBAL_HeadFonts%%.
%%GLOBAL_HeadFonts%% is used to fetch the base theme's fonts. Since you have no control over any %%GLOBAL.something%% and %%LNG.something%% its better to call your fonts just under this line. You can upload your fonts by creating a fonts directory (under template) then call those fonts either within your Style.css or externally using %%ASSET.fonts/myfont.wof%%
Use this https://developer.bigcommerce.com/themes/panels/html_head to understand BigCommerce HTML.head architecture.
Related
I want to implement the feature for admins to set custom templates. Like they can place themes or templates in a particular folder relative to the home folder.
Each theme may have a folder and some config or preview for example(optional).
1) First I need to figure out how to set custom templates dir for an app.
2) Then I can probably do listdir and get all the folders and then give the admin an option to select the dir.
3) A setting list to specify additonal template folders by users.
1 is the problem.
The main question I want answer for is how to set custom template dir which can be modified anytime.
I found out that askbot (the SO clone) implements this kinda theming where you can place themes in subfolders a folder and the admin can select the folder which he/she wants the templates.
I am new to Django. I guess you can do it using jinja templating.
http://jinja.pocoo.org/
Add a common styling to one html page(base.html)
and then extend the base html to whichever pages u want using extends-- check out template inheritance in the above link
Also you can get some cool templates in bootstrap.. checkout their template section. https://www.w3schools.com/bootstrap/bootstrap_templates.asp
Good luck!
I'm developing my templates for Joomla and I'm needing to get the URL of the 'Featured Image' of an article. Is there a special Joomla PHP call to get this as a variable?
AFAIK, You cannot get this directly in the template's index.php file, but you can access it using the template's overrides. So start by creating a HTML folder within your template, then within that folder copy the folders you wish to override.
So for the image url, copy the following file
components/com_content/views/article/tmpl/default.php
to
templates/yourtemplatename/html/com_content/article/default.php
and then within that file you can access use / access the image url.
See more: How to override the output from the Joomla! core
Simple answer is No, an Articles image and URL's values are part of the articles params and are stored as a JSON string. You can find more about accessing them in this answer
The article content (or main component content) of a page in Joomla is displayed by the component, so to display the article content in a custom way a template needs to create it's own overrides for each component or module that it wants to change the appearance of. This is what #mozami was talking about.
I could not find any info on overriding a Joomla plugin in my template.
Some forums claimed there was no plugin override, and the Joomla documentation (being the menacing forest that it is) either has nothing on the subject, or the page is hard to find.
So how can we override the output of a Joomla plugin in the same was we override the output of com_content or mod_contact?
I have found a way to do this:
Navigate to <joomla_homefolder>/administrator/language/<your_language>/
Search for the plugin's corresponding language file.
Copy the file name, EXCLUDING the language prefix (ie en-GB.) and the .ini suffix.
In your template create a folder named html (a common practice for template overrides).
In the html folder create a subfolder and name with the language file name as you copied it in step 3.
Navigate to the tmpl subfolder in the plugin's path: <joomla_homefolder>/plugins/<plugin_type>/<plugin_name>/tmpl
Copy the view file you wish to override into the folder you've created in step 5.
Modify the copied file to override the plugins output.
For example -
To change the page navigation buttons - modify the output of <joomla_homefolder>/plugins/content/pagenavigation:
Go into <joomla_homefolder>/administrator/language/en-GB/ and find the file named en-GB.plg_content_pagenavigation.ini.
From the filename copy only plg_content_pagenavigation.
Create a folder named html (If it does not exist already) in your theme, inside it create a subfolder and name it plg_content_pagenavigation.
Copy the view file <joomla_homefolder>/plugins/content/pagenavigation/tmpl/default.php into the plg_content_pagenavigation folder you just created.
Modify the file.
Note: I have tried it only with Joomla 3.1.
The method may not work with some plugins.
Good Luck.
In joomla 3 you can override plugins output only, that's why the origin plugin must be implemented with a tmpl.
The naming convention of the folder in you [template]/html is
plg_[type*]_[pluginElement]
Template overridden native joomla plugins is only the pagenavigation.
type* : obviously there's no sense to be other than content but if it's custom plugin no one can stop you.
On a Joomla 3.1 install, I am using the Simple Image Gallery plugin and I felt the need to override it in order to add extra functionality to each thumbnail of the gallery.
I copied all of the contents of <joomla_homefolder>/plugins/content/jw_sig/jw_sig/tmpl/ into the folder <joomla_homefolder>/templates/protostar/html/jw_sig/ and I was then able to modify both the default.php file for output modifications, and the accompanying template.css file for styling modifications. This successfully overrides the plugin's output without risking issues during future updates.
Of course, this will not work with all plugins, but it offers another alternative if you have a plugin that was nice enough to be developed with a tmpl folder.
No you can't override the same way because there is not tmpl folder because plugins really should not be rendering though of course a lot do. You probably need to clone the plugin and make a the layout your want possibly using a jlayout to make it easier to manage.
Elin's answer is not quite correct for Joomla 2.5-3.x. Some plugins do render screen output and have /tmpl folders that you may be able to override. See http://docs.joomla.org/Layout_Overrides_in_Joomla
In some cases you may need to create alternative views within the plugin /tmpl folder. For example, some of the simple, newer custom content components that use JForms let you add fields to com_content articles and select a view template for each field. Then overrides for com_content are generated dynamically to display the custom fields. Each field type can be displayed in the component area through plugins, or in a module, or within the template code, but it will use the /tmpl file you selected for the field in the CCK component. If there is a way to override the different field views from within the template folder, it must require an arcane menu structure I haven't been able to discover.
Im developing an e-commerce with Joomla 2.5 using a template which has a slideshow embedded (not a module).
I want to create an article where the client himself can easily upload images and their descriptions and urls for the slideshow.
I've managed to load a file uploader module in an article and it works. But I don't know how to change the descriptions and urls.
The descriptions and urls are template parameters and I don't know how to set them from the article.
The params.ini file in template folder is blank.. The .xml shows the 's for them but not their current value.
You are getting two functions to work, but you're missing the whole logic that links images to pages, and assigns them names, possibly manage a little security.
Why do you want to build this from scratch? You'd be so much better off with a ready-made, free, tested and supported CCK (e.g. contentbuilder, k2, sobi, zoo just to name a few).
I like the IntelliJ 'live edit' feature but it doesn't work for Django templates because obviously they are just a bunch of variables and its not finding the CSS files. Is there some way of working 'live' on Django templates? (or any other templating system for that matter).
Similarly I tried to use Chrome devtools autosave but it also didn't work, presumably it wants me to open an html file locally (i.e. file://).
And using chrome inspector to edit stuff is a pain because you have to copy and paste your changes - unless I'm missing something?
I am using IntelliJ 12.0.4 Ultimate with the Python plugin (this is more or less equivalent to PyCharm) to work on Django templates. It doesn't look like the Live Edit functionality works as per usual, indeed because the template has to be rendered to HTML first by Django.
One alternative is to assign a keyboard shortcut to the "View | Reload in Browser" menu item.
Another alternative is to use a Chrome plugin such as ChromeReload: You can set this to reload a specific page at a specific interval.