Coder Social home page Coder Social logo

Comments (30)

JCMais avatar JCMais commented on May 30, 2024 2

This feature is necessary for people using client side templating engines, like mustache and handlebars, inside volt views.

from phalcon.

bungcip avatar bungcip commented on May 30, 2024 1

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.

jodator avatar jodator commented on May 30, 2024

I've also think that qoing in line with twigs' naming would be better since some dev tools already supports Twig markup.

from phalcon.

xavier-rodet avatar xavier-rodet commented on May 30, 2024

I totally agree with that and it could avoid conflicts with AngularJS syntax too !

from phalcon.

deep9 avatar deep9 commented on May 30, 2024

πŸ‘ for verbatim

from phalcon.

datanator avatar datanator commented on May 30, 2024

verbatim works for me!

from phalcon.

datanator avatar datanator commented on May 30, 2024

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.

knallcharge avatar knallcharge commented on May 30, 2024

Plus One, definitely, I'm trying to output an RSS-feed with volt and "<?xml..." breaks it.

from phalcon.

 avatar commented on May 30, 2024

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.

malczak avatar malczak commented on May 30, 2024

πŸ‘ for verbatim

from phalcon.

blocklogic-au avatar blocklogic-au commented on May 30, 2024

+1 for verbatim

from phalcon.

JCMais avatar JCMais commented on May 30, 2024

+1 for that, using handlebars template while inside a volt template is really hard right now.

from phalcon.

negreanucalin avatar negreanucalin commented on May 30, 2024

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.

negreanucalin avatar negreanucalin commented on May 30, 2024

It would look like this (stackoverflow copy).

    module('myApp', []).
    config(function ($interpolateProvider) {
        $interpolateProvider.startSymbol('[[');
        $interpolateProvider.endSymbol(']]');
    });

from phalcon.

zjsxwc avatar zjsxwc commented on May 30, 2024
{{'{{'}}
  ugly but works
{{'}}'}}

from phalcon.

rhagni avatar rhagni commented on May 30, 2024

+1 for verbatim

from phalcon.

vikilaboy avatar vikilaboy commented on May 30, 2024

+1 verbatim

from phalcon.

anusornNg avatar anusornNg commented on May 30, 2024

+1 verbatim

from phalcon.

yanko-ivanov avatar yanko-ivanov commented on May 30, 2024

+1 verbatim,

or get the resolveExpression hook to work before volt throwing a syntax error exception.

from phalcon.

wolftankk avatar wolftankk commented on May 30, 2024

+1 verbatim

from phalcon.

dred86 avatar dred86 commented on May 30, 2024

+1 verbatim @andresgutierrez

from phalcon.

Jurigag avatar Jurigag commented on May 30, 2024

Just add proper function for know, just workaround if you need to use it @JCMais

from phalcon.

 avatar commented on May 30, 2024

@zjsxwc {{ '{{ var.prop }}' }} Way less ugly and still works.

from phalcon.

Jurigag avatar Jurigag commented on May 30, 2024

For me less ugly is:

{{ ngb('var.prop') }}

from phalcon.

andmm avatar andmm commented on May 30, 2024

Was this issue ever resolved?

from phalcon.

datanator avatar datanator commented on May 30, 2024

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.

Jafarili avatar Jafarili commented on May 30, 2024

+1 for verbatim

from phalcon.

niden avatar niden commented on May 30, 2024

Closing in favor of phalcon/cphalcon#13855. Will revisit if the community votes for it, or in later versions.

from phalcon.

elcreator avatar elcreator commented on May 30, 2024

+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.

StudioMaX avatar StudioMaX commented on May 30, 2024

Still relevant

from phalcon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.