Comments (30)
This feature is necessary for people using client side templating engines, like mustache and handlebars, inside volt views.
from phalcon.
why not to use {% verbatim %} {% endverbatim %} syntax?
Volt syntax is very similiar with twig so I think it is much more make sense if we go with twig syntax.
http://twig.sensiolabs.org/doc/tags/verbatim.html
from phalcon.
I've also think that qoing in line with twigs' naming would be better since some dev tools already supports Twig markup.
from phalcon.
I totally agree with that and it could avoid conflicts with AngularJS syntax too !
from phalcon.
π for verbatim
from phalcon.
verbatim works for me!
from phalcon.
And since I am currently developing applications using Angular which uses {{...}} like tags, the need to have some form of {% verbatim %} construct got harder.
My Volt templates look pretty silly with all these {{"{{scopevariable}}"}} things in it...
Plus One please
from phalcon.
Plus One, definitely, I'm trying to output an RSS-feed with volt and "<?xml..." breaks it.
from phalcon.
I simply added a filter
$compiler->addFilter('raw', function($resolvedArgs) {
return $resolvedArgs;
});
It doesn't do blocks, but it's a decent solution with the way I'm using the templates.
from phalcon.
π for verbatim
from phalcon.
+1 for verbatim
from phalcon.
+1 for that, using handlebars template while inside a volt template is really hard right now.
from phalcon.
I know that for Angular you can change the double curly braces to suit your needs with volt, found this http://docs.angularjs.org/api/ng.$interpolateProvider
from phalcon.
It would look like this (stackoverflow copy).
module('myApp', []).
config(function ($interpolateProvider) {
$interpolateProvider.startSymbol('[[');
$interpolateProvider.endSymbol(']]');
});
from phalcon.
{{'{{'}}
ugly but works
{{'}}'}}
from phalcon.
+1 for verbatim
from phalcon.
+1 verbatim
from phalcon.
+1 verbatim
from phalcon.
+1 verbatim,
or get the resolveExpression hook to work before volt throwing a syntax error exception.
from phalcon.
+1 verbatim
from phalcon.
+1 verbatim @andresgutierrez
from phalcon.
Just add proper function for know, just workaround if you need to use it @JCMais
from phalcon.
@zjsxwc {{ '{{ var.prop }}' }} Way less ugly and still works.
from phalcon.
For me less ugly is:
{{ ngb('var.prop') }}
from phalcon.
Was this issue ever resolved?
from phalcon.
AFAIK no.. I use Smarty 3 standard. I value full template inheritance and verbatim tags. Only Smarty3 an Twig seem to fully support that and Smarty is the faster of the two. Now building a Zephir version of Smarty3, that would be awesome...
from phalcon.
+1 for verbatim
from phalcon.
Closing in favor of phalcon/cphalcon#13855. Will revisit if the community votes for it, or in later versions.
from phalcon.
+1 for verbatim as it's very useful to assign Twig file parser for .volt extension in the PHPStorm so it will correctly parse this.
from phalcon.
Still relevant
from phalcon.
Related Issues (20)
- [NFR]: removeBehavior method in Model
- Can't access page, 404 FORBIDDEN
- [NFR]:returnedValue not updated after dispatcher->forward
- [NFR]: ADD sticky for read write connection
- Can I use `$this->getRelated` on already cached data?
- [BUG]: Scrutinizer Fixes HOT 1
- [NFR]: No way to add html attributes to Select Tag. documentation inadequate HOT 1
- [BUG]: The "setDefault" method does not work for forms of type "text" with name "value" HOT 5
- update src folder links
- How to use cookie in phalcon 4.x ? HOT 1
- update tests folder links
- [NFR]: Complete rework of ORM HOT 3
- [BUG]: \Phalcon\Encryption\Crypt + named parameters/arguments throw fatal error. HOT 1
- [NFR]: Refactor Phalcon\Mvc\Router/Route HOT 1
- [NFR]: Refactor Phalcon\Mvc\Model\MetaData
- phalcon 3,4 webhook problem HOT 2
- [NFR]: What is the purpose of this libraryοΌ HOT 3
- [NFR]: Add a getResult() or fetchAll() method to Resultset\Simple
- [BUG]: when i use JWT Builder , api returns blank HOT 1
- [NFR]: Refactor Phalco\Mvc\View
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phalcon.