Emmet not working in WebStorm in .php files - webstorm

I just started using WebStorm. Emmet is working perfectly with .html files, but not with .php files. Any fix for that?
Problem: writing .container + clicking on Tab should give <div class="container"></div>, but it's not doing that in PHP files. In HTML files it's working perfectly.

In WebStorm, .php files are simple text files highlighted using textmate bundles; HTML language is not injected there, so advanced HTML features do not work.
As a workaround, you can try modifying Zen HTML live templates context in Settings | Editor | Live Templates by appending Other to it, like:
but this has to be done for each template separately

Related

Styling Ionic2 templates with local scss

Based on this tutorial I started an ionic2 project from a tutorial template http://ionicframework.com/docs/v2/getting-started/tutorial/adding-pages/.
After successfully adding a new mypage.html and mypage.ts page under /app/pages/mypage I also wanted to align my objects to center on my page, so I created a mypage.scss file with the content:
.centered {
text-align: center;
}
Also note that I added the class centered on the mypage.html <ion-content> tag.
What I found that when I serve my page the gulp won't compile and add my own styles to /www/build/css files. Am I missing something or is it buggy?
You need to include it in your app.core.css file like this:
#import "../pages/mypage/mypage";
The first mypage is the name of the folder, and the second one is the name of the file (the extension is not needed)
Okay so I found that you have to also import your file to /app/theme/app.core.scss. Which I don't really think is a good solution from ionic team (even worse I did not see this mentioned anywhere).
I think you could edit the gulpfile to source all the scss files under app directory so you don't have to import every single file to app.core.scss

WebStorm minify css

I am using closure-compiler.jar to minify my .js files. However WebStorm doesn't give me an option for .css ? How can I minify .css files with WebStorm ?
You can create a second file watcher with 'Cascading Style Sheet' file type and set css specific parameters in the 'Arguments' field.
closure-compiler is for JavaScript only. For CSS you need to install a different filewatcher, such as YUICompressor via npm.

How to get tpl files highlighted in pycharm?

What file association will get the correct highlighting for *.tpl files in Pycharm? I have tried HTML and PHP, but neither seem to get it 100%.
I am using bottle and python 2.7 on a Windows machine.
Just setting it like the picture:
Choose Editor -> File Types -> Recognized File Types -> HTML
Add a Registered Patterns: *.tpl
Your question will be solved.

Edit opencart header.tpl

I'm trying to edit the header.tpl of an opencart website that uses vqmod - I need to add some more info (text) to each menu link, so basically edit the header file.
I've looked into the vqmod manager and files but I can't seem to get it right.
Unfortunately, whenever I try to edit the header file, the site breaks -I've tried editing the cached vqmod files as well, no luck with that.
Is there a way to reset the vqmod / disable it, then edit the header.tpl and enable vqmod again?
Do I need to install a new theme and start from scratch?
To Disable all vQmod's simply rename the files in /vqmod/xml/ so that their extensions becom .xml_ instead of .xml - Then delete all the files in the /vqmod/vqcache/ folder so that no cached files are used and it should work. That said, if you are wanting to add extra text to menu items, why not just edit the /admin/language/your-language/common/header.php file's text?

HTML5 Boilerplate - Modifying the build.xml for WordPress

I'm trying to get the Build Script that's included in HTML5 BoilerPlate (http://html5boilerplate.com/) to play nicely with WordPress. I've successfully changed the default config to compress style.css in the root of a WordPress theme, but I'm not sure how to modify the build.xml to run through the WordPress header.php and footer.php.
Normally build.xml runs through the index.html file and strips out commenting then, most importantly, changes the version name of the css and js file references.
I'm imagining this should be pretty easy for a developer to figure out, the build.xml uses regular expressions to replace lines of code.
I'd like the build.xml to wizz through my header.php and footer.php, performing the same optimisations as it does with index.html.
Can anyone suggest which parts of the build.xml I need to modify to accomplish this?
you do not need to edit the build.xml file. Just add the files you want parsed to build/config/default.properties :
#
# HTML, PHP, etc files to clean and update script/css references
#
file.pages.default.include = index.html, 404.html, header.php, footer.php