I am working with Drupal 7 and need to create some alternate page tpl's so that I can have pages full width as well as a page with one right sidebar. I have read the documentation and scoured the net and at this point am totally stumped.
Step 1: I created a new content type called test and made it a basic page.
Step 2: I went to the template.php file and added the following code for the pre_process page function:
if (isset($vars['node'])) {
$vars['theme_hook_suggestions'][] = 'page__'. $vars['node']->type;
}
Step 3: I created a new page named page--test.tpl.php
Step 4: In admin > configuration > I cleared the site cache
Step 5: Epic failure... the newly created page does not render and the page.tpl.php is still displaying. I tried different browsers & cleared cache to no avail. I don't know what I did wrong as my procedure seems to follow the correct steps that I have studied.
A search here landed me at custom page-xxxx.tpl.php doesnt works but the suggestion there is to implement the same preprocess code that I have already installed.
I found some great information at https://drupal.stackexchange.com/questions/36054/how-to-have-a-another-page-tpl-php-file-in-drupal-with-different-regions-and-blo which enabled me to solve this issue.
The solution:
Instead of naming your custom page page--yourcustompagename.tpl.php use a format like this: page--node--23.tpl.php If you are unsure of the node number of your custom page navigate to the content section and hover your mouse over the edit option for your custom created basic page and Drupal will display the node number for you.
As mentioned in one comment you will also need to clear your cache by clicking the clear cache button in Configuration > Performance > Clear Cache. You should also clear the theme registry as mentioned in a comment above. A helpful tool I found for clearing the theme registry is the Magic Module which you can find at https://www.drupal.org/project/magic After you install this module go to Appearance > (Your Active Theme) Settings > Development Enhancements and check the box for "Rebuild Theme Registry on Reload"
Related
I need help in how to identify which .Class CSS in communities I have to edit?
I am able to inspect the what changes needs to be done but unable to understand that in communities how do I edit it as I cannot find the class in it.Issue with button.
I am able to inspect it, but when I try to edit my changes made to communities, I am unable to find .slds-size_2-of-12 in communities. I am trying to make the changes from this Edit Css Make changes in communities. Please any one can guide me a little.
If the buttons come from aura/lwc custom code you should be able to set CSS on that component's level and it'lll override community defaults.
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_css.htm - empty file should be generated for you automatically
https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.create_components_css - there will be no empty file, create one in same directory as rest of component, with same name (myComponent.js, myComponent.html -> add myComponent.css). Here's a bit advanced example: https://salesforce.stackexchange.com/a/339936/799
If you're after community-wide change - in the Builder go to Security "tab" and there should be a menu to "edit head markup", you can paste some CSS overrides here. For example use this to hide Chatter "+ Follow" button on all pages. Since it's standard - you couldn't do it in component-level CSS.
I'm having an odd issue after having migrated my drupal project to a client's server.
After configuring the apache http.conf to accept clean urls, I'm now finding that the administrative overlay does not always respond.
-The Find content shortcut doesn't respond, but the Content link on the overlay does.
-The Edit link when on a node's detail page makes the site darken like it does when the overlay is being loaded, but the Edit window for the node never appears.
-The X (close) on an overlay page (like when using Content to see the list of all nodes, but then want to quit out of it and go back to the site) fails to close the overlay and a strange, second vertical scrollbar appears on the right of the browser screen.
I have had a similar problem before, but chalked it up to javascript on the page interfering with the overlay's own javascript. Now I'm not so sure.
If anyone else has had this problem, or can surmise what the issue might be, then I would appreciate any and all help given.
My thanks,
~M#
It looks as if you are using a jQuery version that is incompatible with the overlay module. It's probably because $.browser is deprecated in jQuery 1.9, see the following issue:
Uncaught TypeError: Cannot read property 'msie' of undefined - jQuery tools
To fix this issue, you'll need to install the latest jQuery Update module and select something below jQuery 1.9 for the admin interface. This should clear up your problems in IE.
I recently started to learn about AngularJS and came across WebStorm and the AngularJS plugin by John Lindquist. Started by creating a new project using the angular-seed project and imported to WebStorm using File -> Open Directory. My directory structure looks like this
Now when I try to Debug it I get a 404 error. If I move the file app/index.html to the root folder and adjust all URL's to begin with app then it works fine. Is there a way to keep the default folder structure without moving the index.html to the root folder and also make it work with WebStorm?
I am using WebStorm 6.0.2.
I use WebStorm 7, so there might be some discrepancy in comparison with version 6 that you're using, but the over-all functionality is the same.
Quick solution:
Open the file in the editor and right click in the code to access the context menu. Choose the "Debug" option, which should start a debug session pointing to the current page.
Configuration solution:
WebStorm supports configurations for setting up different debugging scenarios. From the "Run" menu, choose the "Configurations" option. Add a JavaScript debug configuration, and add the URL you want in the designated field within the dialog presented.
Then, when you initialize a debugging session (a general one, not one for a specific page), you're presented a small dialog that allows you to choose a debug configuration.
Maybe there are more options or ways to accomplish the same thing as well, but I've never really given it more thought. I hope this is a working solution for you, but if not there's alway the documentation. If you need further clarification with regard to my answer, just give me a comment.
Drupal 7, wysiwyg module with the ckeditor library installed. The text formats are configured. I have used and set up this module/editor configuration various times with no problems, so I'm baffled.
In this case there is simply no editor showing at all in the content creation pages, just the default text box.
Any ideas?
Kind of late to the party, but I just faced this issue and managed to solve.
What i did was:
1) Go to /admin/config/content/wysiwyg
2) for each entry under "text format" I clicked edit.
3) expanded "Show Buttons and plugins" and checked all of them
4) cick save
Worked for me...
In case anyone else is having this issue - I just managed to fix it for a role by allowing them to view the admin theme
I had a similar issue, but here the wysiwyg menu was not showing only for one of my content types.
I have de JQuery Update module installed. The problem was solved when I went to /admin/config/development/jquery_update and changed the Default JQuery version for administrative pages from 1.7 to 1.10.
It was working fine for me. Let me describe the working example.
1) Download drupal 7 wysiwyg module
2) Go to CKEditor download or else v3.5.3 .Please only download version 3.5.3 because other versions may be giving problem. (Read it more from here)
3) After downloading the editor library, put it into sites\all\libraries\ckeditor .
4) Goto -> admin -> configuration -> Wysiwyg profiles
if you placed library correctly into " sites\all\libraries\ckeditor ", then you can see the edit options.
According to your need set the options.
5) Go to content creation area, here you can find your result based upon your setting.
ie, if you enabled it for Full html text format, it will be available only when you set text format as Full Html.
Please see the attached image for more help.
can you try to disable the menu that is created inside the node editing if this option is checked, save your node without this option and see if it works
I had a simular problem. All the answers I found previously did not help me.
The solution for me was the following: disable the "Aggregate JavaScript files." option!
You can find this option under: Configuration -> Development -> Performance
I hope it helped
I am using C1 3 and am having problems with the preview pane.
The C1 site uses master pages for templates, and works correctly when published. However, it is not displaying correctly in the preview pane. It visually appears to be ignoring CSS settings.
This site was copied from an original install, on another sever, that works correctly.
Any tips and or ideas would be greatly appreciated.
*UPDATE**
In the content view, which is not working, it is using this url
http://www.abc.com/Composite/content/Frontend/Images/logo.gif
All other sites, including the published version of the site above use this url
http://cms.abc.dev/Frontend/Images/logo.gif
I am assuming the same is happening for all images and style sheet references.
However, I cannot find where this is happening. In the master page items are referenced as follows:
href="~/Frontend/Styles/layout.css"
ImageUrl="~/Frontend/Images/logo.gif"
Thats weird... have you somehow accidently configured the /Composite/Content folder as an application? Thats almost the only explanation why asp.net would expand ~ to /Composite/content/ instead of just /.
The preview-tab is handled through a wrapper-page that lives inside /Composite/content, unlike normal viewing of published pages which is handles by the root itself.
I think i found the problem...
I created a new app pool, used it, and now it works.
I guess the app pool somehow got corrupted...