Preview theme in drupal - drupal

I am using drupal for the first time. I have successfully developed my first drupal website to a certain extent. I have used my own custom theme for the front-end and blue marine theme for administrator. Now my client's requirement is that when he clicks on preview button before submitting the page in admin panel, he wants to see the preview in a pop-up window with the front-end's theme. Please help me with your ideas and suggestions on how to achieve this?

When you set the administration theme, leave the "Use administration theme for content editing" unchecked. This should allow content creation / previewing in the "front-end" theme.
EDIT: Assuming you are using Drupal 6.x

Have you seen this module - http://drupal.org/project/pagepreview it aims to give you what the page will look like on the front-end theme.
There are some caveats though, for instance the menu will not be correct if this is a new node

As far as I know Themeing is a complicated process in Drupal, it involves many modules and hooks, so I don't think it's an easy task for a module (maybe) to do that, or in core like Wordpress.

I'm working on getting a nice solution to this too. I won't post the code yet cos it's a work in progress, but essentially I make an ajax call to retrieve a known node and then replace the node content of that page with the content of the preview box before showing the merged page in a popup window.
If it works out alright I might make a module out of it.

This might help: https://www.computerminds.co.uk/drupal-code/making-accurate-responsive-node-preview-drupal-7
Patches the Page Preview module with some of the Responsive Theme Preview modules functionality for viewing the page at different screen sizes in the preview panel.
Page preview's caveats still apply though.

Related

Search plugin breaking parts of theme

I've been asked to add a search function to a website. I'm trying this out on a testing site at http://www.somethingchronic.org.uk (the password to view is Entrand0s1).
I've installed a search plugin which works on all pages except the home page. On that page it clashes with the script in the slider plugin and when I tried deactivating the slider plugin I also lost the four large buttons at the bottom of the page which are part of the theme itself. Both the slider plugin and the theme are old but I'm hoping to keep the site going for a little while longer if I can. I asked for advice from the search plugin developer who said it's to do with the slider loading an older version of the jQuery library. I searched on here for jQuery library conflicts - one answer linked to the learn.jquery website with a list of options for avoiding library conflicts. There were a number of options for adding code - I tried adding some of these to the header.php document but each time the site broke completely and truth is I don't know enough about jQuery to know which is the correct piece of code to try. Any advice appreciated - would be great to know if there is a way to get the search plugin to also work on the home page whilst keeping the current slider. Many thanks

What will happen to my content if i switch from elementor to simple editor?

Want to switch my elementor builder interface in simple editor like old Html one on my website tellthebell* as my site load's slowly due to this builder. want to know if my content will be loss or just the design will change?
Or suggest something that might help my loading time of site.
Yes agreed with the #cengiz sevimli Not only design will be lost also the content can be deleted. However if you have added any posts it will be saved at backend and you can add it up again from there in the new design.
well, a simple and easiest trick to do is save your content (Manually save in word doc) by pressing ctrl+A then switch to the old mode of HTML, if you lose your design/ interface..try editing or adding content that you already saved...Also, you can change your theme and again use the same content, etc.. it works very well you just need to be little tricky :P
Frist, you need to perform speed optimization for your website. It will help to load your website as soon as possible.
You can use Autoptimize and WP Rocket Plugin to boost the speed of your website.
Second, if you will switch your website from elementor to another builder you will lose complete design. After that, you need to redesign your website.
For check the speed of your website use : https://gtmetrix.com
If you change your builder, you may end up losing your designs. However you can try backing up your builder's raw code by pressing "Use Default Editor" like:

Link blocks to composer in Concrete5

I'm just playing about with an offline copy of Concrete5 and was wondering if there is any way to link blocks to the composer system to make them work? I made a page template hoping I could just click 'new page' and select my template to add it to the right area of my test site, but it won't show up. I then tried to edit a preset page template from my theme, and that worked fine... except it still populates the new page with the original blocks.
It seems like a total nightmare to do anything in this system. Should I be using a different one if I can't even do this?
I am not sure I fully understand your question but have you had a look at this tutorial? It might help https://documentation.concrete5.org/tutorials/setup-a-simple-blog-within-concrete-5-7

Wordpress site not rendering properly on mobile

I am a newbie to wordpress development and somehow managed to put together a website - http://www.checkgaadi.com.
However, I am simply not able to get this to work properly on a mobile device.
Have tried several plugins (e.g., WPtouch, WP Mobile detector etc.) which are supposed to help. Here when I tried WPtouch for the first time it went to a "mobile site" and was more or less responsive. There was also a button to switch to desktop site. I clicked this button and now I only see a distorted version of desktop website on mobile, but now I don't find the button to go back to mobile theme. I have tried deleting the plugin and reinstalling, deleting the "wptouch-data" folder etc hoping to clear the cache and several other tricks but nothing seems to bring back that button to switch between desktop and mobile themes.
Anyone who has some experience with WPtouch (or any other simple plugin you recommend) may perhaps tell me how to get that "switch mobile<->desktop" button back? For the moment I have disabled WPtouch on the website so you may not see it.
As a second option, it seems to me that only certain parts of the landing page need fixing (e.g., some CSS tinkering with the topmost part) and mostly it should be okay without really getting into the WPtouch stuff. Could someone please give me guidance with the CSS modifications needed to fix the issue?
Thanks so much.
Just click the "core settings" of Wptouch. Then you will see the general settings. There is a "Desktop / Mobile Switching" option under the "Landing page" option. Put a tick into "Show switch link in mobile view" box. I hope it will work for you

Can someone please explain how to integrate open graph & Like button into wordpress?

I am trying to implement Open Graph and the “Like” button on my wordpress website. I want to have the Like button positioned directly beneath a youtube video posted on one of my wordpress pages.
I have watched the facebook open graph video explaining the code to put onto your page, but it doesn’t explain how to do it in wordpress. I have researched several wordpress plugins that implement open graph into your site, but they all seem to take data from the site itself and automatically implement it into the open graph data. It also seems to me that using the “Like” button wordpress plugins, the like button is automatically placed either at the top or bottom of the page or in the sidebar.
Can anyone please help me understand exactly how to implement the open graph code into wordpress in a manner where I can control all the parameters of the code (image, url, site name, description, etc), and how to implement the Like button directly underneath of the video on my webpage?
Thanks,
It doesn't matter if it's "for Wordpress" or not. Wordpress is a framework, not a language. Use the Like Button Tool to generate the code you need for ANY Page - Wordpress or otherwise - and read up on the Open Graph Protocol to give you an idea on how to write your <head> section.
Facebook's Debugging Tool will also help you with any caching issues you may be experiencing, along with lots of extra information you might find useful in regards to your website.

Resources