I'm trying to give my webform node a readable name to make it easier to find and edit.
I'm able to use the template I created called "webform-form-12.tpl.php" and theme that, but I want to use something like "node-webform-form-athlete-of-the-month_submit-your-athlete.tpl.php". The path I gave this webform is "athlete-of-the-month/submit-your-athlete". It's not working with any names I've tried. I'm using a node preprocess function to add template file names. I've tried these so far:
node-webform-athlete-of-the-month_submit-your-athlete.tpl.php
node-webform-form-athlete-of-the-month_submit-your-athlete.tpl.php
This one: "node-athlete-of-the-month_submit-your-athlete.tpl.php" uses the template but the form is not there.
What version of webform? The latest Webform 2.x and 3.x should support the use of TPLs.
Related
I am new on drupal, Can you help me to make custom template in drupal and how i call this?
I want to create a custom template and how i call this in my node
and also please describe how the block call in under page content, there is any shortcode for block?
Hi create YouThemeName folder and put it in /site/all/themes/.
In theme folder create file YouThemeName.info and insert it:
name = YouThemeName
description = YouThemeDescription.
package = Core
version = VERSION
core = 7.x
// Regions
regions[header] = Header
regions[content] = Content
regions[footer] = Footer
And you new template is ready. For more inforamation please visit Drupal.org and read documentation.
Looks like you want to override some Drupal template? As of Drupal 7.33 there is theme debug mode, to enable just add row to your settings.php: $conf['theme_debug'] = TRUE; and then just open page for which you want to override template and open developer tools there(Use Ctrl+Shift+I (or Cmd+Opt+I on Mac)), you will see something like this http://take.ms/XOXZt and can identify which template to create and how to call it, more you can read here https://www.drupal.org/node/1089656
Creating custom template in drupal is super easy, you can create a file name like node--[type|nodeid].tpl.php and place it in templates folder of your theme.
Remaining drupal does the magic, your can do your stuffs in the custom template file. Similar way to create for custom block tempalte file too.
For more information you can check this url:
https://www.drupal.org/node/1089656
List template in dynamic data list in Liferay
I have already read this post and also another webapplicationdeveloper blogpost but not find any idea to get action button in customly applied template to dynamic data list.
I have also tried including that default record_action.jsp of dynamicdatalist portlet in vm template but its not working and also set the property below
journal.template.velocity.restricted.variables =
in portal-ext property but still I am not getting the action button in my custom template
I have already tried this :
#
set (
$categoriesService = $portal.getClass().forName("com.liferay.portlet.asset.service.AssetCategoryLocalServiceUtil").getMethod("getService", null).invoke(null, null))
My answer is: Yessss, it works. But I want use a jstl lib (e.g. <aui> or <ui>) as well. In my opinion the simpliest way to do it is include jsp file to themeServletContext. Put your file.jsp into your theme:
your-theme/docroot/path/to/your/jsp/file.jsp
and paste this piece of code into your vm (for example portal_normal.vm):
$theme.include($themeServletContext, "/path/to/your/jsp/file.jsp")
In this case it unable to find the $theme variable my page displaying the $theme as it is...:(
Please help:
Leave velocity, it's too poor to use taglib, and switch to freemaker language: more powerfull and full support of taglib.
Here there is an example to use freemaker for theme develment, but it's good starting point also to template in dynamic data list.
https://www.liferay.com/it/web/mika.koivisto/blog/-/blogs/using-freemarker-in-your-theme-templates
Look also freemaker guide: http://freemarker.org/docs/index.html
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.
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.
I need to add a webform to my page-home.tpl but I'm really new on Drupal so I need a really clear help...
I'm using DRUPAL 6 and I have created the webform.
I would like to add the webform to my custom template just adding the php code to the tpl file. My webform id is id="webform-client-form-20".
Can you help me ?
Thanks a lot
The quickest (not necessarily best) way to do it is using a combination of node_view() and node_load():
$nid = 20; // Node ID of the webform.
$webform_node = node_load($nid);
echo node_view($webform_node);
You'd be better off loading that into a variable in a preprocess function than outputting it directly in the theme but this should work for your purposes.