Welcome Guest, Not a member yet? Register   Sign In
Twig help or hindrance
#15

(This post was last modified: 02-07-2017, 03:46 PM by ignitedcms.)

(02-07-2017, 03:40 PM)Diederik Wrote: Just a side note, if you plan on using the 'echo shorttag' like <?= $variable ?> be sure you don't want to support PHP<5.4. Prior to PHP5.4 if you disabled php shorttags you disabled the this echo function as well. Since 5.4 it's better seperated, even if you turn off php shorttags (like the 'normal' opening tag <? instead of <?php) you can still use the short echo tag.

To be ontopic, I'm more in line with @skunkbad. I do share the opinion that {{ variable }} looks pretty nice, but less technical staff (designers) still  fuck things up because they dont understand. And a fresh junior developer will need to learn another language to make sense of this, while <?php echo $variable ?> should be clear.

Wait I thought CI came with rewrite short tags for servers less than php 5.4 in the config file

Code:
/*
|--------------------------------------------------------------------------
| Rewrite PHP Short Tags
|--------------------------------------------------------------------------
|
| If your PHP installation does not have short tag support enabled CI
| can rewrite the tags on-the-fly, enabling you to utilize that syntax
| in your view files.  Options are TRUE or FALSE (boolean)
|
*/
$config['rewrite_short_tags'] = TRUE;

Also I'm leaning towards a non-twig version purely because it does require an extra learning step as well as my own server doesn't support twig (which is really a lame excuse)
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com
Reply


Messages In This Thread
Twig help or hindrance - by ignitedcms - 02-07-2017, 12:36 AM
RE: Twig help or hindrance - by skunkbad - 02-07-2017, 12:57 AM
RE: Twig help or hindrance - by ignitedcms - 02-07-2017, 01:12 AM
RE: Twig help or hindrance - by skunkbad - 02-07-2017, 11:10 AM
RE: Twig help or hindrance - by skunkbad - 02-07-2017, 01:00 AM
RE: Twig help or hindrance - by ignitedcms - 02-07-2017, 01:18 AM
RE: Twig help or hindrance - by ivantcholakov - 02-07-2017, 09:04 AM
RE: Twig help or hindrance - by ignitedcms - 02-07-2017, 10:08 AM
RE: Twig help or hindrance - by ignitedcms - 02-07-2017, 11:52 AM
RE: Twig help or hindrance - by ivantcholakov - 02-07-2017, 01:17 PM
RE: Twig help or hindrance - by ignitedcms - 02-07-2017, 02:53 PM
RE: Twig help or hindrance - by ivantcholakov - 02-07-2017, 03:24 PM
RE: Twig help or hindrance - by ignitedcms - 02-07-2017, 03:38 PM
RE: Twig help or hindrance - by ivantcholakov - 02-07-2017, 05:14 PM
RE: Twig help or hindrance - by Diederik - 02-07-2017, 03:40 PM
RE: Twig help or hindrance - by ignitedcms - 02-07-2017, 03:44 PM
RE: Twig help or hindrance - by Diederik - 02-07-2017, 03:53 PM
RE: Twig help or hindrance - by laynebay - 02-07-2017, 08:17 PM
RE: Twig help or hindrance - by ignitedcms - 02-09-2017, 02:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB