Preprocess function user logged

Hello,
I would like to know if it's possible to declare a preprocess function in the .theme file to select a template according to the user logged or not ?
I want to make sure that once logged, the user does not see lot of <div>.
Thanks !
G

Drupal 8 - Counting results from a view insert

I insert a block of a view with contents, as follows:

{{ Drupal_view ('people', 'persons_by_sector', javi_node_id) }}

In this way, my people view, in the persons_by_sector module passing the sector ID javi_node_id (pre-processed) I get a list of people related to sector X.

This works perfectly.

The problem is that I need to know how many results this view insertion returns. How can I count them?

I tried:

sub theme css not over riding base theme

I'm trying to add a subtheme to Bartik called "local", mainly to create local css. The code is below.
The css definitely loads, but gets over-written by bartik css. Is there a way to make sure that my css is loaded last?
Any suggestions what I'm doing wrong?

The entity (user :20) cannot be referenced

I am getting the above issue when an approver tries to publish the content that is submitted by the editor. Can you please suggest me the solution for this.

Drupal 8 caching

I have a scenario where I need to present a simple form for a user to toggle a preference (Country) on every page. Users are largely anon users.

When toggling I add a value (the country) into a cookie.

I'd like Drupal to then cache all content based on that cookie value.

I've got to the point of a custom module to present the form as a block and write the cookie variable. However the 'form' won't keep its default value (based on the cookie value) when navigating to another page. I'm getting the last page built ignoring the cookie.

How to customize registration/account forms

I have been trying for weeks to figure out how to make my user registration/user account screens handle what I need. The user profile I need to use has 80 fields. I had planed on using a tabbed page, with each tab having a different layout. One tab would have name and address and 3 email fields. One tab would have 3 columns of yes/no radio buttons. Some of the fields would be drop-down select lists. for a while I played with the idea of using the Webform module, but apparently you can't use a webform for the registration/user account forms.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x