This forum is for assistance with theme development.

How can redirect after create new content or page

want to redirect new content submission to admin/content instead going to node/id, since i use different templates for each content type and loading node/id will render like broken template, so to prevent it, decided redirect all contents to main content list page and tried function mytheme_form_alter(&$form, FormStateInterface $form_state, $form_id) {} but it returns below error:

@media queries below 1024px do not work in custom theme

Hi All

I have a custom theme that has the following folder structure

  • css/style.css
  • sass/
    • setup/_mixins.scss
    • sections/_footer.scss
  • style.scss
  • gulpfile.js (compiles scss files imported in style.scss)

My _mixins.scss file has the following:

undefined drupal_add_js function inside themename_preprocess_page

I am using Drupal 8.x and I wanted to use javascript to delete an option from the list of options within specific pages, i.e., content type, using a pattern of their machine names, i.e., proxy_request, in case the user is not an administrator and I searched and found this code inside a post and I used it inside the project's themes->mythemename->mythemename.theme file, but that didn't work and I have several problems I want to know how to solve, as I searched a lot I did not find a solution

undefined drupal_add_js function inside themename_preprocess_page

I wanted to use javascript to delete an option from the list of options in case the user is not an administrator and I searched and found this code inside a post and I used it inside the project's themes->mythemename->mythemename.theme file, but that didn't work and I have several problems I want to know how to solve, as I searched a lot I did not find a solution

Display copyright info in a bootstrap subtheme using *.twig

I'm doing a test on Bootstrap Barrio, but it can apply to all bootstrap/standard subthemes

I've created a custom Barrio subtheme, let's call it 'orange', and I've created a twig file that allows to display the copyright info without install a module.
The twig code:

<div class="copyright">
&copy; {{ "now"|date("Y") }} {{ site_name }}, {{ "some text" }}, All rights reserved.
</div>

Modifying the field help text

Hi,

I'm trying to expand the range of html tags that can be used in the 'Help Text' for fields. I’d like this to be applied to all fields.

I've been trying to use a D7 example and updating for D8/9, but I'm running into problems. This has led me to a lot of API stuff, that I'm not fully sure I'm understanding.

Here's what I've got:

Pages

Subscribe with RSS Subscribe to RSS - Theme development