I have added a new file template to Aptana Studio 3.0.4 as described in this documentation section:
http://wiki.appcelerator.org/display/tis/Creating+a+new+template
The new template now shows up when I select File->New->File and enter an appropriate filename. So far so good.
Now I'd like my new template to show up in the File->New From Template listing. I have not been able to locate any documentation that explains how to do this.
Ok this is actually fairly simple. For my example I will be creating an alternative php file template with a html5 structure.
On the main menu click: Command->PHP->Edit this bundle. You should see a folder named "PHP" appear in your Project Explorer window.
Open the project by double clicking on it and open the folder templates. Inside I see two files: template.php and template.rb
Create the file type you want to add here and name it phpHTML5.php.
Open the newly created file and paste (or create) your template inside and save.
In the same folder open template.rb
Printed at the bottom of the file is the structure:
template "PHP Template" do |t|
t.filetype = "*.php"
t.location = "templates/template.php"
end
Copy and paste it below changing the template to phpHTML5 the following changes:
template "PHP Template" do |t|
t.filetype = "*.php"
t.location = "templates/phpHTML5.php"
end
7. Save and Restart Aptana.
NOTE: You may 'delete' the project PHP but be careful to deselect the "Delete project contents on disk(cannot be undone)" otherwise you will be in trouble...
Any problems with this just let me know, and I will see if I can help with the rest.
Related
I'm using the R package blogdown to create a hugo-powered website. Specifically i'm using the gcushen/hugo-academic theme.
The tutorials by #xieyihui and #apreshill have been wonderfully helpful to get started, and adding new posts is clear, but what about a new static page that uses the same theme as the overall site?
I get that it can be as simple as creating a new .md file with
+++
date = "2017-08-01"
title = "new_page_test"
type = "pages"
+++
## new page test
stuff
My questions are
where do I store this file so that it is copied properly to the public folder?
how to I link to this new page from another page? I'm not clear on the organization of the final file structure that gets published.
I'm doing this for my classes. You can see the end result here, click on "teaching". You can see the source files in the GitHub repository. In particular look under the content/classes folder.
Create a folder under content. I called it classes but it can be called anything. Add an _index.md file to this folder. I edited _index.md from the posts folder so it would automatically create a list of the contents of /classes.
This is drop dead easy! The relative link to a page, say content/yourstuff/yourpage.html is, wait for it, yourstuff/yourpage.html. With an index file in yourstuff the relative link is just yourstuff/. Follow the same structure to add subdirectories. I was blown away.
How to Unset title ('Search results') on Search results page?
I'm still noobish and I was trying this:
function mymodulename_preprocess_search_result(&$variables)
{
$variables['title'] = NULL;
}
You can not change it with a preprocess since the sentence is just a printed string in the template not a variable. So you have to alter the template.
In the templates folder of your theme, duplicate the template from /root directory of your site/modules/search/search-results.tpl.php.
And edit this file as you wish.
The theme template file will be automatically called instead of the one in the core.
You just need to change output rendering. Easy way to do this is to change search core module template file.
Go on:
\modules\search\search-results.tpl.php
In that file just delete output string or replace it with empty one. Find next line in code:
<h2><?php print t('Search results');?></h2>
You can delete whole row there or you can change it to:
<h2><?php print t('');?></h2>
NOTE:
When you change core modules you should pay attention you don't overwrite it with release which comes in new Drupal core (in case you want to upgrade your Drupal core).
If you not sure you will replace this file in future (during possible module or even entire Drupal core update) you might consider copy this file in your theme template folder. After putting that file in your theme template files folder you just need to clear the cache and that file will be called instead of one in core module.
#Laurent Thank you for your update.
Hope this helps.
How to create a new file in my wordpress theme without using ftp client ?
thanks !
Using touch(); PHP function, which creates a new file in the specified directory. This is how I suggest doing it (and admittedly, there are cleaner ways, but this will get the job done, quickly and effectively)…
Open header.php — then write this code in the very top of the file:
<?php touch('wp-content/themes/YOUR_THEME_DIR/FILE_NAME.php');?>
Replace YOUR_THEME_DIR with the directory in which your WordPress theme lives.
Then, replace FILE_NAME with the name of the file you want to create.
Once that’s all done, save Header.php and go to the homepage of your site.
As soon as the homepage loads, it will create that new template or theme file.
Source :
https://www.webmechanix.com/how-to-create-a-new-theme-file-in-wordpress-without-ftp-access/
You can use a plugin called WPIDE found here https://wordpress.org/plugins/wpide/
This plugin will allow you to edit and add folder and files in your project.
I am trying to edit the default page view of a node in Drupal and i found the file called node.tpl.php but even if i change it, the node page on the site isn't updated...
So how can i update the node view page so i can added some text, images etc.. ?
I guess that node_show function () { } is the one that displays the node but the code there doesn't give me enough detail on where the HTML is created so i can it
You need to copy the file to your theme's templates folder and clear the cache out before you can use this file. The original file should be at root/modules/node/
You can also set a template up for a specific content type by copying the default node.tpl.php file and renaming it to node--CONTENT_TYPE_MACHINE_NAME.tpl.php
In our project we used tinymce from creating moxiecode tinymce dll.
I added fr.xml and fr.js files to related langs folder in tinymce folder.
And modified code like below in Language.aspx page which is in langs folder of imagemanager plugin in tinymce folder.
string langfr = "fr';
LanguagePack langPack = man.LangPack;
langPack.Load(this.MapPath(#"im/" + langfr + ".xml"));
Moxiecode.Manager.Utils.GroupCollection groups = langPack.Languages[langfr].Groups;
and modified "en" language selection to "fr".
Is this the right way to add another language to tinymce
I followed the above implementation like in the site
You can only have one langugage per editor instance. Each instance can get its own language-setting using a different tinymce configuration for each editor instance.