Jump to content

Tempalte, tempalte, tempalte...


apeisa
 Share

Recommended Posts

After 9 years using ProcessWire I still do multiple times a day a typo writing template as tempalte (probably write it wrong more often than right). I know few of my co-workers does the same. Is this curse for us Finnish people, or is tempalte thing in other parts of the world also?

  • Like 3
  • Haha 4
Link to comment
Share on other sites

I think this is probably because in Finnish it is pretty rare to see L after P - I think probably only in words that come directly from foreign languages, like application => applikaatio etc.

Very frustrating, maybe we should have a module that adds tempalte as an alias for template... ?

  • Like 2
Link to comment
Share on other sites

I'm not sure about the word "template", but I for sure have a few such words by myself as well. And I can't really blame my native language given I'm likely writing more english text than german ones at least on a physical keyword. At least for mac's there's a way to have aliases, which automatically expand to different text. There might be similar capabilities on windows as well. Maybe that's an option.

  • Like 2
Link to comment
Share on other sites

Possibly because you type too quickly.

(With the Azerty keyboard) I sometimes, for example, typed gogole.com, in the url bar directly or in the search bar of another search engine, wanting to type google.com.

It must happen often, because Google bought it. It is redirected to its page.

  • Haha 1
Link to comment
Share on other sites

That's where a proper IDE should kick in, to do its stuff (auto-suggest/auto-complete etc.). Mere text-editors can only do so much...

With PW, that didn't really work so well for a long time. But if you enable the Functions API, and use page() instead of $page in your code, you'll get the hints in your working environment.

/**
 * Allow core API variables to also be accessed as functions?
 *
 * Recommended. This enables API varibles like $pages to also be accessed as pages(),
 * as an example. And so on for most other core variables.
 *
 * Benefits are better type hinting, always in scope, and potentially shorter API calls.
 * See the file /wire/core/FunctionsAPI.php for details on these functions.
 *
 * @var bool
 *
 */
$config->useFunctionsAPI = true;

 

  • Like 1
Link to comment
Share on other sites

1 hour ago, dragan said:

That's where a proper IDE should kick in, to do its stuff (auto-suggest/auto-complete etc.)

Definitely benefitted from switching to PHPStorm this year haha, typos are less of a trouble! Although I still keep using emacs a lot, so I'm safe 50% of time.

1 hour ago, dragan said:

With PW, that didn't really work so well for a long time. But if you enable the Functions API, and use page() instead of $page in your code, you'll get the hints in your working environment.

This is super nice too!! But can you believe if feels "wrong" writing with functions API???  But since using PHPStorm it is kind of a no brainer to start using the functions API for the autocomplete benefits.

Link to comment
Share on other sites

  • 2 years later...

I had my own similar moment today.  I was using the API to install a Fieldtype module, such as FieldtypeToggle.  It was not working and after an hour of debugging, I found out I had capitalized the T in Fieldtype (FieldTypeToggle -- bad!) which ProcessWire doesn't play nicely with.

  • Like 1
  • Haha 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...