Drupal custom templates improvements

me321
94 Posts
me321 posted this 25 September 2015

In the latest update support was added for custom templates in Drupal. That's an amazingly powerful feature and it's gotten me all exited :)

I think however that a few improvements are needed.

  1. The templates like "post" make very little sense. Ususally Drupal ships with "basic page" and "article" content types (entity bundles). I think it would make more sense if the Themler template names correspond with those.
  2. When creating custom templates, you have to assign them to a URL. That too, makes little sense. It's a good feature to have, but basically a template should be attached to a content type (entity bundle). In Drupal it's very common to have your specific content types for each site, and they would pretty much always require a uniform layout. So if you have a content type called "fruit" it would make sense to be able to create a custom template in Themler, and assign it to all content of the type "fruit", not a URL.
  3. Currently it's only possible to configure how the templates are used if the theme is exported to include the themler module. That isn't desirable, for production sites one would not want the Themler module to be installed.

Furthermore, the problem with working with a URL is that if even if you specify a url logic so that all fruit content has http://.../fruit/[some-title], and configure the template to be show on fruit/*, it would only work on that clean URL but not on it's native url, node/xxx.

In the latest update support was added for custom templates in Drupal. That's an amazingly powerful feature and it's gotten me all exited :) I think however that a few improvements are needed. 1. The templates like "post" make very little sense. Ususally Drupal ships with "basic page" and "article" content types (entity bundles). I think it would make more sense if the Themler template names correspond with those. 2. When creating custom templates, you have to assign them to a URL. That too, makes little sense. It's a good feature to have, but basically a template should be attached to a content type (entity bundle). In Drupal it's very common to have your specific content types for each site, and they would pretty much always require a uniform layout. So if you have a content type called "fruit" it would make sense to be able to create a custom template in Themler, and assign it to all content of the type "fruit", not a URL. 3. Currently it's only possible to configure how the templates are used if the theme is exported to include the themler module. That isn't desirable, for production sites one would not want the Themler module to be installed. Furthermore, the problem with working with a URL is that if even if you specify a url logic so that all fruit content has http://.../fruit/[some-title], and configure the template to be show on fruit/*, it would only work on that clean URL but not on it's native url, node/xxx.
Vote to pay developers attention to this features or issue.
33 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 20 November 2015

looks like this is the same question as posted here:
http://answers.themler.com/questions/45002/can-t-override-contact-page-with-custom-template-anymore

looks like this is the same question as posted here: http://answers.themler.com/questions/45002/can-t-override-contact-page-with-custom-template-anymore
Stagger Lee
1818 Posts
Stagger Lee posted this 10 January 2016

Correction: I just found out that specifying a wildcard (/*) doesn't work.

I think at this stage the custom template feature for Drupal isn't really usable yet, when it is it will be amazing. Hoping this can be announced soon.

Is this fixed ? Wildcard still doesnt work. Themler accept * as regular URL character.

> Correction: I just found out that specifying a wildcard (/*) doesn't work. > > I think at this stage the custom template feature for Drupal isn't really usable yet, when it is it will be amazing. Hoping this can be announced soon. Is this fixed ? Wildcard still doesnt work. Themler accept * as regular URL character.
me321
94 Posts
me321 posted this 10 January 2016

No and the recent update promised to support custom drupal templates as well as core blog and forum templates. It all doesn't work. Ive submitted private issues including two themes but its being ignored for well over a week. I've asked several times for an update but no reply. I guess the drupal developer is MIA but I can't be sure, support is not responding at all.

No and the recent update promised to support custom drupal templates as well as core blog and forum templates. It all doesn't work. Ive submitted private issues including two themes but its being ignored for well over a week. I've asked several times for an update but no reply. I guess the drupal developer is MIA but I can't be sure, support is not responding at all.
Stagger Lee
1818 Posts
Stagger Lee posted this 10 January 2016

Drupal Themler implementation is very neglected, compared to WordPress.

For forum I found how to style topic view, but not main index and forums view.

Drupal Themler implementation is very neglected, compared to WordPress. For forum I found how to style topic view, but not main index and forums view.
Stagger Lee
1818 Posts
Stagger Lee posted this 10 January 2016

I dont get all this logic for templates in Themler. Seems as they complicated it much and now try to reroute templates via non-standard Themler way.

I use Theme debug (core stuff) and no custom template named after Drupal core advices are recognized and respected.
All Themler developers need to do is give us option to name custom templates as Drupal advise. (we have it but Themler do something and they are not respected)
Theme debug shows what priority and what names are needed. it is all, no need for funny settings in Theme settings in backend,

https://www.drupal.org/node/223440

F12 in Chrome reveals what we need to do:

<!-- THEME DEBUG -->
<!-- CALL: theme('page') -->
<!-- FILE NAME SUGGESTIONS:
   * page--front.tpl.php
   * page--node.tpl.php
   x page.tpl.php
-->
<!-- BEGIN OUTPUT from 'modules/system/page.tpl.php' -->
…
<!-- END OUTPUT from 'modules/system/page.tpl.php' -->

Or other example:

<!-- THEME DEBUG -->
<!-- CALL: theme('html') -->
<!-- FILE NAME SUGGESTIONS:
   * html--node--add--forum--1120.tpl.php
   * html--node--add--forum--%.tpl.php
   * html--node--add--forum.tpl.php
   * html--node--add.tpl.php
   x html--node.tpl.php
   * html--default--2.tpl.php
   * html.tpl.php
-->
<!-- BEGIN OUTPUT from 'sites/all/themes/Web/templates/html/html--node.tpl.php' -->

I dont get all this logic for templates in Themler. Seems as they complicated it much and now try to reroute templates via non-standard Themler way. I use Theme debug (core stuff) and no custom template named after Drupal core advices are recognized and respected. All Themler developers need to do is give us option to name custom templates as Drupal advise. (we have it but Themler do something and they are not respected) Theme debug shows what priority and what names are needed. it is all, no need for funny settings in Theme settings in backend, https://www.drupal.org/node/223440 F12 in Chrome reveals what we need to do: <!-- THEME DEBUG --> <!-- CALL: theme('page') --> <!-- FILE NAME SUGGESTIONS: * page--front.tpl.php * page--node.tpl.php x page.tpl.php --> <!-- BEGIN OUTPUT from 'modules/system/page.tpl.php' --> … <!-- END OUTPUT from 'modules/system/page.tpl.php' --> Or other example: <!-- THEME DEBUG --> <!-- CALL: theme('html') --> <!-- FILE NAME SUGGESTIONS: * html--node--add--forum--1120.tpl.php * html--node--add--forum--%.tpl.php * html--node--add--forum.tpl.php * html--node--add.tpl.php x html--node.tpl.php * html--default--2.tpl.php * html.tpl.php --> <!-- BEGIN OUTPUT from 'sites/all/themes/Web/templates/html/html--node.tpl.php' -->
Stagger Lee
1818 Posts
Stagger Lee posted this 10 January 2016

Themler debug is only one line in settings.php. All beginners can do it, just put short info in Docs. I do understand Themler has no access to this file but it is very easy to activate.

$conf['theme_debug'] = TRUE;

Themler debug is only one line in settings.php. All beginners can do it, just put short info in Docs. I do understand Themler has no access to this file but it is very easy to activate. $conf['theme_debug'] = TRUE;
Stagger Lee
1818 Posts
Stagger Lee posted this 10 January 2016

If I use some of the Drupal core advised template names I get error "Invalid php-file name".

OK, some are Ok and "valid". Just scroll down and find one that works. Be carefull, not to use templates for blocks or views. Read Theme debug in source code (or F12) right.

If I use some of the Drupal core advised template names I get error "Invalid php-file name". OK, some are Ok and "valid". Just scroll down and find one that works. Be carefull, not to use templates for blocks or views. Read Theme debug in source code (or F12) right.
Stagger Lee
1818 Posts
Stagger Lee posted this 10 January 2016

@me321, how do you list/display articles from custom content type without Views ?
I read it is not possible without custom coded module, only possible with Views.

And problem is Themler cannot touch single thing inside Views. Headings, bullet lists, links, no styling att all affect Views display.

**@me321**, how do you list/display articles from custom content type **without Views** ? I read it is not possible without custom coded module, only possible with Views. And problem is Themler cannot touch single thing inside Views. Headings, bullet lists, links, no styling att all affect Views display.
Kos
23 Posts
Kos posted this 15 February 2016

Hi,

Do I miss something??? with the latest Themler Update it's all changed, the User interface changed completely.

Can Support explain again how to created the Template for custom Content Types???

when I do the Websites with Themler, I have now different approach of the way I build the Web-sties with Drupal. As I only have to use content types Article, Basic Page and Blog, separating them with the Categories (Taxonomies) in Drupal, this way I'm sure that no other content types is in use that is not in the Themler.

BUT!

I have old websites I need to make a New Themes for.
There is content created with content type named WEBFORM ( webform module )
here is example of what happening at the moment.
all the website pages are ok ( www.myfamilyclinic.ie ) but When I open the page created with content type Webform ( http://www.myfamilyclinic.ie/en/node/19 ) it's opens without the standard header. and If you navigate to another page, or submit the form, you will get a good number of errors regarding template problem.
So, How do I make content type WEBFORM to use the Template called PAGE in Themler?
Ho do I make other Content Types themed in Themler? please explain properly....

Regards,
Kos

Hi, Do I miss something??? with the latest Themler Update it's all changed, the User interface changed completely. Can Support explain again how to created the Template for custom Content Types??? when I do the Websites with Themler, I have now different approach of the way I build the Web-sties with Drupal. As I only have to use content types Article, Basic Page and Blog, separating them with the Categories (Taxonomies) in Drupal, this way I'm sure that no other content types is in use that is not in the Themler. BUT! I have old websites I need to make a New Themes for. There is content created with content type named WEBFORM ( webform module ) here is example of what happening at the moment. all the website pages are ok ( www.myfamilyclinic.ie ) but When I open the page created with content type Webform ( http://www.myfamilyclinic.ie/en/node/19 ) it's opens without the standard header. and If you navigate to another page, or submit the form, you will get a good number of errors regarding template problem. So, How do I make content type WEBFORM to use the Template called PAGE in Themler? Ho do I make other Content Types themed in Themler? please explain properly.... Regards, Kos
Kos
23 Posts
Kos posted this 15 February 2016

ok.. ignore me... I have sorted this, somehow... not really sure how, but works so far...

ok.. ignore me... I have sorted this, somehow... not really sure how, but works so far...
Support Team
Support Team posted this 19 February 2016

Hi kpulman,

Here is the article about custom templates in Drupal:
http://answers.themler.com/articles/26302/how-to-use-custom-templates-in-drupal

It may be helpful.

Thank you,
Olivia

Hi kpulman, Here is the article about custom templates in Drupal: http://answers.themler.com/articles/26302/how-to-use-custom-templates-in-drupal It may be helpful. Thank you, Olivia
webmetod
35 Posts
webmetod posted this 19 April 2016

Hello everyone.
Dear developers! Can you make so that you can delete all templates except the base? Or do only one base by default? If someone needed even add any number of additional.

I can not use a custom template to all pages? I am very tired to deal with this, a lot of time is spent on it. I turn back to Artisteer ...

enter image description here

Hello everyone. Dear developers! Can you make so that you can delete all templates except the base? Or do only one base by default? If someone needed even add any number of additional. I can not use a custom template to all pages? I am very tired to deal with this, a lot of time is spent on it. I turn back to Artisteer ... ![enter image description here][1] [1]: http://i77.fastpic.ru/big/2016/0419/6c/c82673bbad59bfcbb37976ffb4ce3c6c.jpg
Support Team
Support Team posted this 21 April 2016

Hi,

All templates have different structure. unfortunately you cannot use one template for all pages.
But we are considering the possibility of implementing this functionality in the future.

Themler theme supports shared areas with orange border- Sidebars. These areas were created to share controls between templates.
Simply add all controls inside Sidebars and enable these Sidebars on all templates.
To keep the same style of the article area simply style one of the Posts controls and set this style as default:

posts-set-as-default.png

For customised posts controls on other templates please use "reset to Default" option. This option will reset Posts style to default (see above):

posts-reset-to-default.png

Thank you,
Olivia

Hi, All templates have different structure. unfortunately you cannot use one template for all pages. But we are considering the possibility of implementing this functionality in the future. Themler theme supports shared areas with orange border- Sidebars. These areas were created to share controls between templates. Simply add all controls inside Sidebars and enable these Sidebars on all templates. To keep the same style of the article area simply style one of the Posts controls and set this style as default: !posts-set-as-default.png! For customised posts controls on other templates please use "reset to Default" option. This option will reset Posts style to default (see above): !posts-reset-to-default.png! Thank you, Olivia
You must log in or register to leave comments