I have a drupal 8 installation with adaptive theme installed.
I have used this to generate my own theme (peterstheme)
This allows for custom css.
I have an issue in that I can now not update my custom css.
When in Drupal I go to
Home -> Administration -> Appearance -> Appearance settings
to the custom CSS tab I can see the contents of the custom-css.css file
Here it says
Styles entered here are saved to themes/exceed/styles/css/generated/custom-css.css.
When I save any changes it does not save them and definitely not to that file.
When I go to the drupal/themes/exceed/styles/css/generated/custom-css.css
and edit it directly the changes do not reflect in the drupal custom css.
I have flushed all the caches in drupal, cleared browser caches etc.
I have Configuration -> Performance. Set page cache to no-caching.
I have made sure that the permissions on the custom-css.css have (User ,Group,World read and write) or (666)
I cannot find any other custom-css.css file.
I must be missing something.
I do not want to rebuild a whole new theme how can I update this?
Thanks in advance.
Peter
You need to add the css file path in ThemeName.libraries.yml file under css section.
Related
I am working on a drupal website that has a theme installed to it.
I would like to set the Front/Home page of the website to a .html.twig template I have in a custom module I am busy working on.
How would I go about doing this? I have done some googling and it likes like the answer lies somewhere with page--front.html.twig, but I am not sure where to go from here.
Inside my themeFolder/templates there are page--front.html.twig & page.html.twig
I have tried creating my own page--front.html.twig and storing it inside myModule/templates but this did not help me.
Also, how would I go about applying .html.twig templates to different regions of my website?
Any advice would be greatly appreciated
Enable debug and check which template is using in front page. To enable the debug go to sites/default/development.services.yml
You will need to locate core/modules/system/templates/page.html.twig file. This is a base page template that you can extend. Copy this file into your theme templates folder (Look for tpl or templates folder - it depends on the theme you are using). Rename this file to page--front.html.twig and finally flush caches for the change to take effect. This can be done by executing drush cr in your terminal or in the UI (admin/config/development/performance).
If you are planning to work on custom layout for your homepage I would suggest creating a dedicated content type (for example Landing page) and setting up your layout with the help of Paragraphs module. This would allow you to avoid hardcoding functionality in you template files.
I'm using wordpress 4.9.6 version it's not showing page template option. I reinstalled wordpress and using default themes and plugins. I don't know the exact reason for this. Please help me out of this. Tell me the reason why it occurs.
Your theme must have template file. The default WordPress themes does not have that by default.
You need to create a new .php file, name it whatever and add this following code in the top:
<?php
/**
* Template Name: your template name
*
*/
One of the easiest way to create a Template, is as follows:
Creating the Template file:
Open up your preferred Text Editor. I would recommend Notepad++ for its 'best of both worlds' feel. It offers a greater range of tools than 'Notepad' whilst not being too overwhelming.
Next, you will need to enter the following code:
<?php
// Template Name: Name of Template.
?>
Then head to File > Save as ... and enter your desired file name. Then within the 'Save as type' dropdown menu, select 'PHP Hypertext Preprocessor file'. This file type will be appended with a series of file extensions, within a set of brackets.
Go ahead and select 'Save'.
Of course, don't forget to enter your relevant Template coding and save as you go along.
Upload to website:
With your Template file completed, you will now be ready to upload this to your website. One of the easiest way to do this, is as follows:
Download FileZilla. If you are unsure of which version to download, stick with 'Download FileZilla Client'.
Once downloaded and installed, open the program. Then login, with your site's credentials. If you are unsure of these, you will need to seek assistance from your hosting provider.
By now, you should see a screen like:
The above image has a lot of blank spaces. If you are logged in, these blank spaces will be populated with various folder and file names etc. Referring to the above image, take take of the contents within the red box. This text bar may be populated. Just enter '/httpdocs/wp-content/themes'. Alternatively, you can scroll through the Folders manually.
All you then need to do, is identify the relevant Theme and drag over the desired template file and drop it into the relevant theme's folder.
When it comes to WordPress themes, you may first want to familiarise yourself with Child Themes. Simply put, if you are not the Theme Author, you will need to create a Child Theme. If you modify the Parent theme, any file modifications will be lost. Whilst this wouldn't be the case, in this instance, you may wish to take this opportunity in understanding Child Themes and implementing said themes now, in preparation for future modifications.
The solution in my case was to add index.php file in theme's root folder.
It appears that adding my theme into Git repository (with Git Desktop) and selecting default .gitignore file of Wordpress incorrectly ignores the index.php file inside theme's root folder, so the file was never uploaded to the server after deploy and WordPress does not recognize the theme as valid one - hence the missing drop-down with template selection.
I am currently working on a custom theme for a phpBB forum.
I installed phpBB on a local web server with Wamp and all my files are there and the website is working correctly.
The problem is that I cannot edit the style with Notepad++ and then just saving, the changes are not showing up when I look in my browser even if I press F12 and look at the CSS code. The code never changes.
The only way I found is to go edit the style through the admin panel (Styles -> Theme -> Edit).
Am I doing it wrong with Notepad++? Is there something special I have to do so I don't have to edit it from the admin panel?
Themes in phpBB have to be imported and applied whenever you want to use them. Assuming you are updating and saving the files that are actually being used, then you'll need to go into phpBB Administrator Control Panel.
Once there, navigate to the Styles tab, and click Refresh for the Template or Theme of the style you have been editing. This will clear the styles from the cache of the board and should allow your new styles to be applied.
I am new to theming in plone 4.3. I was experimenting and set up a rules.xml file to read an existing index.html theme that I had - it of course did not theme correctly and worst - I cannot find a way to log back into the theming control panel. The index.html contents appear on the plone page (without the css somewhow), but I want to go back and remove the rules. I tried to delete the rules.xml file, but that did not help - any suggestions?
As the message at the top of that page says, the theming control panel is never themed. You can get to it directly by URL, e.g. http://localhost:8080/Plone/##theming-controlpanel. Then disable your theme on the 'Advanced settings' tab.
Alternatively you can disable Diazo for a page by appending diazo.off=1 in the query string, e.g. http://localhost:8080/Plone/front-page?diazo.off=1
i tried to configure my imagecache..installed n enabled the module..now i created a cck for images..and set its test mode display as thumbnail preset linked to the node..
now when i am trying to add content to it, its not displaying the content on the node page.
I solved problem,;) when I activated the "ImageAPI GD2" package under the ImageCache module activation form (admin site building).
There are a few things you can check:
Go to /admin/content/node-type/YOURNODETYPE/display and make sure the image field is visible both in teaser and full view.
Make sure proper permissions are set for the files/imagecache folder (the files folder is usually located in site_root/sites/default/)
Check if the image shows up when you are on the node edit page
To use image cache you need to check three things.
check right php extension(GD) is installed
check your folder permission(generally sites/all/files)
ckeck permission for the field is given for drupal