I'm trying to add a custom region to the Zircon theme using Drupal 8 core.
I've been toying around with it for a few weeks now.
I can get the region to show up when I click "Demonstrate Block Regions" however, I get the block/view I created to show up I the region that I created. It also shows up in the block layout page, and I can add blocks to the region but again, the block/view doesn't show up in the region.
As seems to always be the case, I found a few tutorials on the web pertaining to Drupal 7 but very few pertaining to Drupal 8. In one article I came across (see article here) the first step was to edit the template.html.twig file. I can't seem to find this file or the region.html.twig file anywhere. All I could find were html.html.twig and page.html.twig . Where would I find the template.html.twig and the region.html.twig files, and do you think this is my problem?
Any help would be very greatly appreciated. Thanks in advance.
Adding regions to a theme requires:
Adding region meta-data to your THEMENAME.info.yml file
Editing your page.html.twig file and printing the new regions
So just edit these 2 files, just copy paste an existing region and rename it with the proper name
Related
We are using the WowMag theme from ThemeForest for a new website. A problem we are running into is there is some HTML code stored in the display_options column of the views_display table that needs to be modified - however, we can't seem to find a way to access this code and modify it from the Drupal admin.
Example here: https://pastebin.com/8RXpMz3s
You can see the code near the bottom - it appears to have something to do with Semantic Views but we aren't sure.
I'm working on Magento modules.
After few guides I managed to create module that says "hellow world".
Also I have made some of css code that add simple image border around whole page.
So the problem is: how to combine them together?
I want that when I install my module, image border appears around page.
What should I be looking for? Any tips? I need right path to look for answers
T.y.
You need to to
Create a module
That modifies the global layout such that your CSS is added to the page
Re: number two, there's multiple ways to go about doing this. These days I favor the event/observer method
Add an observer for the controller_action_layout_generate_blocks_after event
Fetch the head block from the layout in your observer method
If you find a head block, add your CSS file to it programtically
The more traditional way is
Configure you module to include an additional layout update XML file
In the default handle of your new layout update XML file, add XML that tells Magento to add your CSS file
That should give you enough to google on and come back with more specific questions. Good luck!
I am looking to create a Google Doc type environment in Drupal. The ability for registered users of a website to add a new document, add rows that correspond with columns, and be able to add color styling to the fields, and formatting to text. The different docs will be able to be created by different users, but do not have the ability to create new content types.
Is this the way to go?
https://drupal.org/project/ckeditor-googledoc
Joshi,
I have downloaded the Sheetnode module, installed...
downloaded the socialcalc masterfile, unzipped, and placed it in the sheetnode folder
then turned all
and I still can't get my spreadsheet to show up when creating new content...
thanks for any help you can give...
You can try any or all of the following modules:
https://drupal.org/project/ajax_document_viewer
https://drupal.org/project/gdoc_field
or https://drupal.org/project/sheetnode
Regards.
I've purchased a theme which turned out to not being well documented or supported and after almost completing my website I came across a problem that I can't solve :(
I should start saying that I'm a newbie and this is probably really easy but I can't seem to find the answer.
I created a clone of a view which has a really nice style to it:
http://www.calaverastattoo.com/portfolio/category/
and my clone looks like this:
http://www.calaverastattoo.com/portfolio/category/angel
If someone has an idea of how to fix this I'd really appreciate your help.
Thank you
It is probably because of missing CSS styling. Make sure to copy the required CSS code in the new theme.
You need to duplicate the following files and put them in the same folder location as the originals.
So for example /sites/all/themes/YOURTHEME/templates (This is a guess) will contain the following files. I think angel is the name of your new view?
original - views-view-fields--portfolio--page.tpl.php
duplicate - views-view-fields--angel--page.tpl.php
original - views-view-fields--portfolio--items-summary.tpl.php
duplicate - views-view-fields--angel--items-summary.tpl.php
original - views-view-fields--portfolio--items-summary.tpl.php
duplicate - views-view-fields--angel--items-summary.tpl.php
original - views-view-unformatted--portfolio--items-summary.tpl.php
duplicate - views-view-unformatted--angel--items-summary.tpl.php
original - views-view-unformatted--portfolio--page.tpl.php
duplicate - views-view-unformatted--angel--page.tpl.php
original - views-view-unformatted--portfolio--page.tpl.php
duplicate - views-view-unformatted--angel--page.tpl.php
As this is a custom theme you have bought I'm not 100% of how it loads the template files the above example would work with most drupal base themes.
Cheers Dan
I'm guessing that the view that comes with template you have bought has it's own template which will be a file in the theme directory called something like this (possibly in a directory called tempaltes)
views-view-page--portfolio--portfolio.tpl.php
If you edit the original view look in the bottom right hand corner of the page there is an option called theme with a link called information. Click Information and it shows you which templates files will affect that view.
Thanks
I think in Drupal 6- I needed to add the suggestion of 'node-NID' to the list of template files that were candidates for a node with an nid of 10. Supposedly this is already done in Drupal 7 and indeed I see 'node__10' in my node's theme_hook_suggestions. This should translate to 'node--10.tpl.php', but with that file in place (/sites/all/themes/mytheme/templates/node--10.tpl.php) I don't see the content in that file.
I've also tried node-10.tpl.php, page-node-10.tpl.php with varying numbers of hyphens to no avail.
What am I doing wrong?
Try putting node--10.tpl.php in /sites/all/themes/mytheme instead of in the templates folder and be sure to clear the cache (admin/settings/performance) to allow Drupal to see the template override.