This forum is for assistance with theme development.

Change date format programmatically

I have an entity type with a field called "field_deadline" of type Date, where "Render as a regular field" is set to True. I need to set its format programmatically. I tried the following pieces of code that are ignored:

function hook_date_popup_process_alter(&$element, &$form_state, $context) {
  $element['#date_format'] = 'F j, Y';
}

Also, in a template function as follows:

about drupal8+commerce views filter display

i insert {{dump(items)}} to pager.html.twig to debug twig,then open product list page,turn page from first page to last page,some page can't display pager . and the debug dump 'items' print 'null'.why?

thanks very much.

questions about theme api

on this page
https://www.drupal.org/docs/7/api/theme-api/overview

the 2 code samples at the top show 2 different ways to use theme api

in the second one the name of the theme being use (form, pager ect) appears twice
both as the name of the array ( $build['table'] ) and as one of the key value pairs stored by this array (array(
'#theme' => 'table', ..... );)

why is it necessary to mention the fact that it is a table twice?

Panels have different face in Mozilla and Opera

I want use Panels for main page. And want to get slideshow and catalogmain were in the same row for screen wider 1100px. In Opera it is so/ But Mozilla places catalogmain under slideshow. For structuring i use float. I am new in sitebuilding so can not understand my mistake/ Please help/
na-poluostrove.ru

How to have multiple Navigations in Navbar

Hi, I'm using Bootstrap (no additional theme) essentially in my top navigation I just want there to be three things: the logo, the main navigation, and another navigation for external links. However, I don't want the external links navbar to be a part of the first navbar because I don't need any emphasis on it. Instead, I want it in a collapsible menu that can be toggled using the "three dash button". When the site gets resized, I want the first navigation to join the external links in the collapsible menu. How can I do this?

Theme files modified and uploaded via SFTP not running on live site.

I've recently inherited a Drupal site after our previous developer left. He didn't keep exhaustive notes and is currently unreachable.

I've managed to get access via SFTP, and located, modified and re-uploaded the files that required changes. The files were page--front.html.twig and style.css. They both have clear and profound changes, that do not show on the live site.

Should these files show immediately following changes, or are there extra steps necessary?

Pages

Subscribe with RSS Subscribe to RSS - Theme development