Where are Drupal {{page.variable}} variables defined? - drupal

I am new to Drupal (8) and inherited a Drupal project.
In my page--front.html.twig file i have various {{page.variable}}variables. Where is this list of variables defined? I have my "regions" defined in myproject.info.yml. I created new views and blocks for this. Can anyone help out? Thanks in advance

Related

How do I create a new region in Dupal 8?

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

drupal google doc type module

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.

Accessing html.tpl.php variables from page.tpl.php

Greeting,
I am stuck with accessing $scripts variable of html.tpl.php in page.tpl.php, how to access the variable?
I am using Drupal 7
Please Help.
Thanks in Advance.
In order to alter the page's scripts, take a look at implementing hook_js_alter() in a custom module. That will allow you to perform the necessary alterations without messing with the rendered output. Further info here.
You must send explicity the variable you want to the template you want, template variables are template specific, there's no inheritance or another clean way.
The clean way is send what you need to specific template or implement a hook if it exists and does what you want.
Finally, in this case, I think you have to decide which files are loaded when hook_js_alter is called as suggested jamix.

Drupal loading hierarchy

I want to know more about drupal loading hierarchy process: what is "coming" before what.
For example, is block being rendered before the node ? is the template.php file is being rendered before any tpl ?
If anyone can tell me please the full list/treeview about those template files order when they are being rendered.
Thanks.
http://drupal.org/node/173880
here imho is a good article about how rendering is processed

Drupal 7 Template Suggestions

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.

Resources