NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
how to edit the default html template


Joined: 06 Aug 2010
Posts: 4
Reply with quote
Hi,

wen you select new file / html, it shows a default template.
How can you edit this template?

Thanks in advance
Smile
View user's profileFind all posts by GrumpySend private message


Joined: 06 Jul 2009
Posts: 72
Reply with quote
Hi fella..

Look in:

Code:
$INSTALL_DIR/templates


You'll find all the template files in there. You can edit them to your liking.

Use the '|' (pipe) char to define where you want the cursor to be placed by default when starting with a new template.. so for example, the default HTML template has the | char in the middle of the <title>|</title> tags and new HTML files will have the cursor positioned there ready to go.

You don't even have to close the IDE down to edit / add / remove template files.

You can add your own too just by saving files there (I have a .phtml template for example for Zend Framework templates).. although some extensions (eg: .ini, .txt) seem to fail to display for some odd reason.


HTH.



Cheers..

Ian
View user's profileFind all posts by Ian.HSend private message


Joined: 09 Aug 2012
Posts: 9
Reply with quote
Hi, folks.

Today I came up with the same question, but Ian.H's advice didn't do the trick:

I changed the template for new PHP files to read
Code:
<?php
    |

but PhpED still creates new PHP files with the old
Code:
<?php
  |
?>


Even restarting the IDE didn't change that.

Any ideas?

Thanks in advance,
Estigy

P.S.: I use Version 7.0
View user's profileFind all posts by EstigySend private message


Joined: 06 Jul 2009
Posts: 72
Reply with quote
Hi Estigy..

I think it changed in version 6.something. Installing PhpED now copies the contents of the $INSTALL_DIR/templates directory to your %APPDATA%\NuSphere\PhpED\templates dir.. and it's this dir that the files are actually read from.

I tend to keep the 2 sync'd.. but edit the files as I explained in my post above, then copy the contents of the $INSTALL_DIR/templates to %APPDATA%\NuSphere\PhpED\templates.

No need to close / restart the IDE still either.

HTH Smile



Cheers..

Ian
View user's profileFind all posts by Ian.HSend private message


Joined: 09 Aug 2012
Posts: 9
Reply with quote
Hi, Ian.H

Thanks for your quick answer. That did it! Smile

Thanks,
Estigy.
View user's profileFind all posts by EstigySend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
a side note: internally php runs slightly different if you don't have closing tag in your php files. As a result you may have missed lines in profiler results.
Try for example
<?php
phpinfo();

and compare with:
<?php
phpinfo();
?>

(expected result: with 1st example, last executed line won't appear in the results)

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
how to edit the default html template
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic