creating a page with more views and blocks in drupal - drupal

How to create a page containing more than one view and blocks without using page manager. If it is a home page, we can easily create by saying promote to front page.
If it is an inner page, how to map that page with more views and blocks.
Without using page manager,is it possible?
If it so,kindly share your thoughts.

You create a file with the node-page-id, for example node--1.tpl.php, where you make changes only for this specific page, and then you add your views and blocks using code,
print render($block['content']);
or
print views_embed_view('');

Related

Drupal 7 create blank page

How to create blank page with Views || Panel || Display Suite modules?
Or
How to create blank page with theme-hook, like page--contentType.tpl.php
without fields?
Blank page for landing page or custom layout different with page.tpl.php regions?
I used Empty page module, but not worked for me!
How to create it?
I want to create image gallery page.
It's type of page from views module. views-view--gallery--page.tpl.php.
I need two different layout for page in page.tpl.php
Create a view gallery, then create a page with pane, assign that view to the content pane. Then, create a custom template with the path of the created page. Copy the code from the page.tpl.php and paste it in your custom template.
page--path.tpl.php

Easiest way to implement a temporary page to a Drupal 7 site

I'm a WordPress developer who's been tasked to create a temporary one-pager to a Drupal site. The client would like to have a simple front page with a logo and 4 external links until their new site is ready. Normally I'd just make a simple index.html page with some CSS and call it a day. But in this case they need some of the sub-pages from the Drupal site to continue to work.
Had it been a WordPress site, I would have just created a new template file and a new page inside WordPress, and made that the front page. But as I have zero experience with Drupal, I don't know if you can do the same thing here.
What is the easiest (quickest) way to make a simple splash-page as the front page, while having the rest of the drupal site continue to work? The splash-page should ignore all CSS and JS from the original theme — preferably have a completely independant section fromt the rest of the site.
In Drupal 7 you have few "levels" of templates. First you have "most outer" template html.tpl.php It contains html head and it is usually common for all pages.
Then inside that html.tpl.php you'll include page.tpl.php. That one should again contain some common page elements, as header and footer, but again, if your design requires that, you can have more than one page template.
Page template will include node template. In drupal you have 2 basic content (node) types but you can create many more of them. Basically for every different page layout you can create new content type (but there also are lot of different ways to achieve the same thing).
Basically you should create new content type called i.e. "splash" (machine name!). Add fields to it if they need to be back-end editable.
Then you should create new template file for your content type. Name matters, so you should call it node--splash.tpl.php . You can find and copy to your theme existing node.tpl.php and change it to your needs.
Keep in mind that when ever you add/remove new template file you have to clear the cache so drupal would scan theme directory, notice and start using new templates.
And if you need also different page template for you page you'll have to put some code into you tamplate.php file:
https://www.digett.com/insights/overriding-page-templates-content-type-drupal-7
Drupal template engine design an specific file name for override front page.
You can create the file html--front.tpl.php, and this will be used only for the front page without touch any other page. You can page here your custom HTML and reference css/js.
If the page you need share common styles with the rest of the site, I would recommend to instead override page--front.tpl.php which is basically the content of the page without the tags
For more information here is a link https://www.drupal.org/docs/7/theming/howto/customize-the-front-page-template

Custom Page Templates in WordPress to show Content in specific layout

I want to create a custom page template in WordPress which shows Image Slideshow and then a video below it and finally some text - till now what I am able to do is play with sidebar, footer, header.
I can either remove them or keep them in my custom page templates but what I want to do is play with the page contents.
The Admin user should be able to see these sections in the Page Editor (WYSIWYG) when they choose the Template from the drop-down, so that they can accordingly add the correct content in correct place holders
Something like the attached screen-shot is showing
Is this possible in WordPress
Yes! It's possible to implement this! you can use https://codecanyon.net/item/visual-composer-page-builder-for-wordpress/242431 or https://wordpress.org/plugins/siteorigin-panels/ plugin.
The first plugin allows you to create different page layout and save it. It also allows admin to choose page layout that admin has saved previously.
The second page builder plugin allows you to create template same way and allows admin to clone one page layout to another one.
Hope this will help you!

Drupal add link to another page in header of a block

In Drupal 7 I created a views page, and I want users to have the option to view the results either as a list, or with thumbnails (like on a lot of websites). The only way I can think of doing that is creating one page with the results as a list, and having a link to another page with the results that have thumbnails.
But my question is, how do I add just a random link to the top of my block page that will direct users to the 'thumbnail' page?
I tried to use 'unfiltered text' in the header and put the html for a link in there, and when I went to the page it looked like a link, but I couldn't click it. Any suggestions?
For every view you can create set of templates to style it. When you edit you view open "Advanced options" and then at bottom click on "Theming options" (or suggestions...can't remember real text).
That way you'll get a very useful popup which displays all templates used by view...in specific theme. So if you want to change some template just click on it's original name, pick up it's original code (copy) and create a file. Save it at your theme templates directory, pick some of suggested names, add your link or what ever html you need and clear the cache.
Templating is a bit broad subject to discuss in details for you questions's answer - find some tutorial on net, but general idea is to use custom view template and store your html there.
BTW, I hope you have only one view and different displays for you different pages.

Master Page Loading Multiple Pages

I'm developing a web site that has a master page that consists of 4 different pages that will load simultaneously (using ContentPlaceHolder).
However, when I test the website on my local machine, only one page renders at a time (depending on the URL I type in).
Is there any way that on Page Load, to tell the master (or maybe the browser?) to load all 4 pages instead of only the page that was directly requested from the browser?
A master page doesn't work like a frameset that you display other pages in, you only display a single page using the frameset.
You can have several content placeholders in the master page, but all content still comes from the same page.
If you want to have the content in separate files, you should create user controls that you can include in a page.
It sounds like you should be using iframes. Context place holders are designed so that a single page can display its content against a common theme or background - the master page.
You can have multiple context place holders but they ALL must be populated by the page being loaded. For instance, 1 master page could have a place holder for a menu and another for the content and a third for a news feed sidebar, but the aspx page using the master page has to define the content of all 3 place holders.
Maybe I'm not understanding, but add another page selecting "Web Form using Master Page" from the Add New Item dialog and then on the next window select your master page. Try navigating to the page you just added.
I think you're misunderstanding master pages, the master page does not load anything. The master page defines some common layout (and possibly code), and then you create child pages which only need to supply the content that is not defined in the master pages via the ContentPlaceHolder.
You then load the child pages, one at a time.

Resources