Elementor Pro: removing a template from a built page - templates

I'm just learning my way around Elementor. Have the newest version installed; Pro. I'm wondering if there's a way to remove a template from an already-built page.
I've built several pages using a template to display the subnav for a certain section, but now I want to change it. Tweaking the template doesn’t make changes to the pages I've already built.
So I built a new template* and applied it to the pages, but now both versions are showing up redundantly on the same page.
Question: Is there a way to remove one of the templates from the pages, or do I have to rebuild all those pages? Thanks.
*There seems to be two different places you can build a template. Not sure I understand the difference. The first one I populated by importing the template to each page individually; the second time I checked a box to make it global for that subsection. It's the individual one I want to remove.

Related

I am having serious problems customizing my views template to displayblog entries in drupal 7

I am having serious problems customizing my views template to displayblog entries in drupal 7.
please anyone with knowledge of what can help me please reply. i have gone through a couple of drupal documentations but no luck. my field.tpl.php seem to be the only template that actually affect my displays even though i have views-view-field.tpl.php, views-view--blog.tpl.php in the template .
In the view settings, under format, show, make sure you have fields selected, not content.
Under advanced, theme, click information to see which template files are being used, and click rescan if necessary.
If you have created or edited a view, please check under FORMAT section this should be Show:Fields and under Advanced section look for Theme:Information and click onto this, there will be a popup with all possible templates for the display plugin and for the style plugins. All field tpl will be available here those are exists in views fields, you can find your own and use as per your requirement.
When you edit your view open "Advanced" section on the right (collapsed by default) and click on "Information" from "Theme: Information" (last option in that section). There you can see what templates are used (bolded ones) and what could be used instead. You can even click on template description at the beginning of the line, and code will be displayed. Grab that code (copy) and create new template file with one of offered names. Place that template file in your theme and clear the cache. Now you can modify template by your needs.
Also, you even don't have to use all that hierarchy (even that's desirable), but you can i.e. find the template file that are looping over the rows and inside that loop put your html, so lower rank templates won't be included (i.e. template that iterates over fields or even over rows) . Again not so clear solution, but it works for me. I prefer having less template files and I know that nobody will work on that theme except me.

How to edit plugin to use the theme's template files

I am using a theme called Hemingway, it's a great theme with three page layouts. (full-width, with sidebar, without sidebar). This is all working great. I can choose one of three options in page settings.
I'm also using the Projects plugin by Woothemes. This plugin makes it easy to add recent projects with a photo gallery and some other options. It's working when I'm using the shortcode:
[projects limit="12" columns="2" orderby="date" order="desc" exclude_categories=""]
I'm using this shortcode with two columns on a full-width template. This is working great, but when I'm trying to use the functionality to automatically add the content of projects to the page using the option built-in Projects:
The full-width template is not working and the sidebar is shown. Also the two column layout for projects is not working. They just aligned beneath eachother.
How it should look like (this example is with shortcodes):
http://hoveniersbedrijfameland.nl/projecten/
How it looks with the option in projects to choose a page: (this is wrong)
http://hoveniersbedrijfameland.nl/projects/
How can I debug this to see what breaks it?
What I tried so far:
I've tried the plugin to behave like I want. This means, that the
plugin will use the full page template for 'categories' instead of
using the archive page. I don't really know how the plugin is build,
so it's hard to eit the right file.
I've tried a workaround with url routing, but this isn't the best
approach.
I found a solution. I copied the archive-project.php file to my theme and edited the content with the ones in the full-width template. I need to style it myself because the pages are broken if I leave it like that.
If I want to edit page template now, I need to code it in the ffile instead of choosing it from the pages > page layout in the admin panel.
I'll fix that later.
FINAL UPDATE: I hardcoded everything and it's working for me now. I don't need any further help, I'm now looking into the custom post types to change the content template.

Page Region not display full page width

This is an odd one to me because it only started happening since we moved to Apex 4.2. To get round the problem i have to copy and paste regions I already have in the application, rather than simply creating a new one.
When i create a new application and try to create a region on a page the attached always occurs. This also occurs if i create a new page in a current applications that were already in place before the Apex 4.2 upgrade. Was it even to do with the upgrade?
I assume its something in the Templates or Themes under Shared Componants but i cannot see anything that sticks out.
I thought i would try an HTML5 template to see if that made any difference however the same occurs, see screenprint.
Is there an answer why this is happening and how it could be resolved?
This really looks like it is a template "issue". You need to check your page template: what is it named?
For example, in Theme 23 there are several page templates which include a left, right or both sidebars. When your page uses a template with this sidebar, then the sidebar will always use up a portion of the screen.
If you have no template specified but rather use the "Application Default", then go to "Shared Components > Templates" and look at the page templates section for the template which has a check in the "Default" column. Most likely it is a template including a sidebar.
Aside from that you could also always use a tool to inspect the HTML and CSS. For example, with Firebug in Firefox you could rightclick on the empty space left of your region and choose "inspect element with firebug". It might be a TD element. It might be a div with a fixed width. It might be custom css pushing things about.

Django -- hide links from certain users

Is it possible, on a Django webapp, to hide certain links from those users who do not have the permission to click the link?
I bet there is a per-link way to check if the user has persmission to click the link, and then show the link (or not) based on that test. However, when there are a lot links spread across a whole bunch of web pages, that can be ridiculously tedious. Are there any ways to achieve this across the whole website with a setting or something?
write a template tag similar to spaceless that goes over its contents and removes all links that are not accessible. this would save you from having to touch each link manually.
It might be possible to write a custom template tag that would accept a link url, reverse it, introspect what permissions were required for the target view, and then conditionally display it.
You'd still have to touch every link in every template that you wanted to make fancy like that, and it would probably be an ugly beast. All in all, it's probably easier if you come up with a more centralized way to control access.

How to ensure that a javascript file is included only once in Django

I have a few child templates which have extraheads which include the jquery script. Sometimes they are used together. How can I have the jquery javascript file loaded only once? If it were convenient to set template variables, I could set and check one before including the line.
My advice: Just include jQuery on your base's <head> and call it a day. Saves you from having to worry if a child template uses jQuery or not and it is just a 19kb download on the first page load and that's it. If you use Google's API cloud, it may not even be any as the user might have it cached from another site.
This may not work for you, but I advice you to consider it if possible.
My usual approach to this problem is to either wrap all of my child templates in one template that takes care of my includes (JS and CSS). I then make sure my caching is set properly, so that these scripts are only downloaded once per user. In other words, I force the download of all my external scripts on the first view, then rely on caching to not redownload the JS each time.
Combining all of your JS into one file will also improve download time due to the reduction in requests that will be generated.
Another thing to note is that you mentioned putting the JS in heads. While most people do this, placing JS in the head can make your pages appear to load slower. JS files are not downloaded in parallel, so they block all other downloads. Google and Yahoo recommend placing JS at the bottom of your page where possible to improve the user experience.
See the Yahoo YSlow tool and the Google PageSpeed tool for this.
I'd mostly bite the bullet and load jQuery with every template. But if you really really really have to have this feature, then I'd recommend a custom template tag. Check out the docs, especially the part about setting a variable in the context.
You could define separate blocks for your script and for other extraheads in base template.
In base template leave block for your script blank. Fill it with link to a file when needed in templates which are extending base.
You could pass all required files as a context variable and then write a template tag that removed duplicates and loaded what was left.
You could control load order this way also.