Joomla 2.5 mod_banners how to add additional templates? - joomla2.5

How can I add additional templates to mod_banners in j2.5? From the module configuration you can choose the template - which is just default.php by default.
I've tried adding my modified template to the tmpl folder but it doesnt appear in the drop down in the module parameters - can anyone shed any light? I want to use multiple templates so I have already modified tmpl/default.php

Your filename should be mytemplate.php. Joomla uses underscores to process templates and sub template files. The dropdown checks for files without an underscore and only shows those.
That form field uses the field type modulelayout. This core layout uses a regex to avoid names with underscores in them: ^[^_]*\.php$.
No underscore and you will be good to go.

Related

How to copy Discovery rules from one templates to another in zabbix

How to copy the discovery rules from one template to another like items and triggers to another template?
This is not supported currently. You might want to vote on the feature request.
If there are many of those, you could look into exporting them to XML, hacking the XML and importing it. This would not be a supported approach and you would be on your own.
Export the template. Use a text editor to find and replace every occurrence of the template name in the exported xml file with the name of the template you'd like to create. Then, import it.

Include another template in the application.hbs

I am using EmberJS with HandleBars and using the Yeoman setup, (but I updated dependencies to the latest).
I have a relatively large application.hbs, and I want to separate it into different files like top-bars.hbs and main-content.hbs and so on, then I want to include them in the application.hbs. but I do not have any views for them, just some separation of the big file, I do not want to make ajax requests for those templates, just want to separate and then include them.
How can I do this in emberJS?
I think what you maybe looking for is a partial. What you would do is make a partial file in the directory you want most likely somewhere with all the other templates. The resolver complains about either leading underscores or dashes in Yeoman so if one blows up try the other this is mostly for a visual indication when looking through your files which ones are partials. So make _top-bars.hbs and put the code you want in there. and the in the application.hbs just do `{{partial "top-bars"}} and it will put the template into the application template without changing the scope.

Tell TYPO3 extension to use different template using Typoscript

I'm trying to get an extension/plugin on a page to use a different template from the one its hardcoded with.
I made an html template stored in:
typo3conf/ext/myextension/pi1/new_extension_template.html
I made a typoscript template object in the root of my site (so it would definitely get picked up).
In it, I have defined the following simple Typoscript (names changed for demonstration)
plugin.tx_myextension_pi1 {
templateFile = typo3conf/ext/myextension/pi1/new_extension_template.html
}
However when I load the page containing the plugin, I get a "no typoscript template found" error on that black TYPO3 error page.
I have tried a bunch of alternative ways in case the syntax was wrong but the above worked for me when working with the tt_news plugin.
E.g I have tried these without success too:
templateFile.file = typo3conf/ext/myextension/pi1/new_extension_template.html
...
tempfile.template_file = typo3conf/ext/myextension/pi1/new_extension_template.html
Any ideas what I'm doing wrong?
Can html templates stored in typo3conf be called via typoscript stored outside the plugin?
I'm thinking perhaps html template files would have to be stored in fileadmin/plugin_templates/ for this to work.
You are mixing things: no typoscript template found means that on the page you inserted the plugin there is no TS template available.
Page with plugin isn't nested under the main page (which - as I assume - has main TS template and is displayed properly), so just drag it into the main page, or create new TS template on its level.

modx is only showing html code, not the template

I have installed ModX and Downloaded the "Basic" Template in the Extensionmanager! I chose the Basic Template at my first Page for the Resource! I cant find a Globalsetting to choose an Template? My problem is that if iam going to the site i only get the pure html code shown, no website! Why is this?
AFAIK there is no "Globalsetting" to choose a template. One of the nice things with MODX is that each resource can specify which template to use. So you can mix and match as required.
You could check if you have set the base href tag in head like this:
<base href="http://www.yoursite.com"/>
It will tell the site where to start looking for the other files that you have included in your markup.

Include templates based on current language with drupal

I'm looking for a fast way to display a particular template file based on the current language of the page.
Let's say I have two languages : english and french (english being the default)
I have various templates files, like : page.tpl.php page-node-11.tpl.php in my theme directory.
I'd like to find out a way to include these files based on the current languages; so for example if the current language is 'english', it will include 'page.tpl.php', if the current language is 'french' it will include 'fr/page.tpl.php'.
I'm sure it's pretty straight forward, but can't figure out how; in template.php ?
Thanks for any help.
Assuming you're using the Internationalization module, rather than changing the template per language, you may want to consider taking advantage of the CSS class set on the body tag. I've used that technique on sites before and it was easier than dealing with another template file. If you don't use the i18n module, you could still add the body class inside a preprocess_page function.
If a body class won't work for you, you could look at the patch from the issue above for an example of how to add the language to the variables array during preprocessing. Then see the Working with template suggestions handbook page for how to add template suggestions based on the newly added language info.