Skip to main content
replaced http://drupal.stackexchange.com/ with https://drupal.stackexchange.com/
Source Link

I'm thinking to load latest news in some hook_preprocess_HOOK function (using the EntityFieldQueryEntityFieldQuery object) then add them inside a variable for the Twig template. Inside the template I will perform a for loop rendering latest news at the page's bottom. Is this a good way to do it or I'm completely out of the way?

I'm thinking to load latest news in some hook_preprocess_HOOK function (using the EntityFieldQuery object) then add them inside a variable for the Twig template. Inside the template I will perform a for loop rendering latest news at the page's bottom. Is this a good way to do it or I'm completely out of the way?

I'm thinking to load latest news in some hook_preprocess_HOOK function (using the EntityFieldQuery object) then add them inside a variable for the Twig template. Inside the template I will perform a for loop rendering latest news at the page's bottom. Is this a good way to do it or I'm completely out of the way?

edited body
Source Link
Andrea
  • 1.3k
  • 2
  • 15
  • 28

I'm building a custom theme and I would like to display last thirdthree inserted news (i.e. nodes with content type = News) on the bottom of the home page from inside the home page template.

I'm building a custom theme and I would like to display last third inserted news (i.e. nodes with content type = News) on the bottom of the home page from inside the home page template.

I'm building a custom theme and I would like to display last three inserted news (i.e. nodes with content type = News) on the bottom of the home page from inside the home page template.

deleted 15 characters in body; edited title
Source Link
Andrea
  • 1.3k
  • 2
  • 15
  • 28

Automatically display Display latest three news on a custom template

I'm building a custom theme and I would like to automatically display last third inserted news (i.e. nodes with content type = News) on the bottom of the home page, from inside the home page template.

Now I would like to automatically display latest news inside the homepage template as in the figure above. What is the better/simplest way to do it?

Automatically display latest three news on a custom template

I'm building a custom theme and I would like to automatically display last third news (i.e. nodes with content type = News) on the bottom of the home page, from inside the home page template.

Now I would like to automatically display latest news inside the homepage template as in the figure above. What is the simplest way to do it?

Display latest three news on a custom template

I'm building a custom theme and I would like to display last third inserted news (i.e. nodes with content type = News) on the bottom of the home page from inside the home page template.

Now I would like to display latest news inside the homepage template as in the figure above. What is the better/simplest way to do it?

Correction
Source Link
Andrea
  • 1.3k
  • 2
  • 15
  • 28
Loading
Trying to improve the question
Source Link
Andrea
  • 1.3k
  • 2
  • 15
  • 28
Loading
added 4 characters in body
Source Link
Andrea
  • 1.3k
  • 2
  • 15
  • 28
Loading
removed tags from title
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
Loading
Source Link
Andrea
  • 1.3k
  • 2
  • 15
  • 28
Loading