Questions tagged [volt]

Volt is the template engine of Phalcon PHP.

Filter by
Sorted by
Tagged with
0 votes
0 answers
42 views

Is there no autocomplete for volt components in vscode or is my setup broken?

I have this class in one of volt components, but I didn't get any autocomplete when referencing the chirps variable with $this->chirps nor did vscode show any of the methods associated with the ...
Yusuf Bouzekri's user avatar
1 vote
2 answers
75 views

how to implement two layer of layout in Phalcon?

I'm using Phalcon and Volt , this is folder Structure in my project for layout app/views/layouts/default.volt and structure is like this default.volt is main layout that come with all pages . now I ...
morteza mortezaie's user avatar
0 votes
1 answer
217 views

How to Pass array in Volt Template to javascript

I'm using Phalcon and Volt template engine . This index.volt and I'm going to pass an array to JavaScript <script type="text/javascript" > var usersList= {{ array_from_volt }} ; &...
morteza mortezaie's user avatar
0 votes
0 answers
224 views

Prevent new line in rows in mPDF

I am trying to make an A4 page with mPDF with 20 lines. It should always fit on one page with the same font size and line height. The text in each line can vary in length. If it's too long, I just ...
AlesSvetina's user avatar
0 votes
1 answer
53 views

How to dynamically change value in .volt on screen view

I am using phalcon, .volt template I am getting some data from database(predictability). Svg has one line starting on line 0 and finishing on 30. Another line is draw about first line and it should ...
michaela šatarova's user avatar
0 votes
1 answer
280 views

how to define variable in phalcon php volt blade and assign data to it?

i have a variable in my blade that its set to the blade in controller $this->view->->setVar("formData", $formData); my formData is an array from my submitted form now i want to ...
Sina Ghafarian's user avatar
-2 votes
3 answers
408 views

how to use php and volt parameter together?

I am using Volt and PHP in phalcon volt partial I want to iterate a loop and in the loop I have php code that accept a parameter this is my code {% for header in headers %} <th> <?=...
morteza mortezaie's user avatar
0 votes
1 answer
164 views

volt : pass variable to include from parent template

I am beginner with volt , I have a template that use a partials like this main.volt <div> hello to {{ partial("partials/tst",["name":"kevin"]) }} </div> ...
morteza mortezaie's user avatar
1 vote
1 answer
198 views

How to pass an array to js button click in phalcon volt template engine

I am passing an associative array from my controller to my view and then iterating it on the template engine <tbody class="text-center"> {% for inv in inv_list ...
technogeek's user avatar
1 vote
1 answer
59 views

binary format of a PeakTech 1330 oscilloscope

Does anybody know the binary format of a PeakTech 1330 oscilloscope? What I do know: The first 32 byte seem to be a header describing the instrument. The last 94 byte seem to describe the setting (...
Ricardo Erckert's user avatar
0 votes
1 answer
41 views

How to drop existing constrain on colum in Voltdb with LiquideBase

I'm working with Vold DB and Liquid base. I have one existing table with all column having nullable=false constrain LiquidBase Code <changeSet> <changeSet author="abc.xyz" ...
Anish Barot's user avatar
2 votes
1 answer
417 views

Bootstrap navbar, new dropdown does not close already opened dropdowns in mobile view

I'm having issues with navbar in mobile view. When clicking on a new dropdown while one (or more) dropdowns are already opened, it adds on top of the old one instead of closing any already open ...
Jepay's user avatar
  • 31
0 votes
0 answers
30 views

Inheritance multiple view from base view

I want to include multiple layout file in index file of view and extends all of them from master.volt. But my problem is level-1.volt doesn't render when I run index.volt. Is my workflow ok? What is ...
sinak's user avatar
  • 232
0 votes
1 answer
890 views

pass variable to function in volt template in phalcon

this is my controller that i pass data to view: here i pass variable named name: class IndexController extends ControllerBase { public function indexAction() { $this->assets->...
sinak's user avatar
  • 232
-1 votes
1 answer
383 views

how to remove special characters from string in volt templates

Please can anyone help me on this issue? how to remove special characters from string Thanks in advance
kulasekaran's user avatar
1 vote
2 answers
1k views

Target and manipulate single DOM element in vue

Somehow I still can't wrap my head around some core vue concepts. I have made some simple webpage using phalcon. Created it so, that it would work without JS and now is the time to add some bells and ...
heliogabal's user avatar
-2 votes
1 answer
72 views

How to register the volt engine without using the dependency injector?

I want to render a volt file using Phalcon view. How can I register the volt engine without the dependency injector?
Lingha Anparasa's user avatar
0 votes
1 answer
630 views

How to get VOLT TEMPLATE in a variable inside CONTROLLER?

I'm trying to generate PDF using DOMPdf where i need HTML of a volt template. The volt template is generated dynamically. So how can i get the volt template html in my controller as variable. ...
Imad uddin's user avatar
0 votes
1 answer
251 views

Including .css files in twig/volt

Is that possible to include a css files in volt templates, just like another volt file? Something like this? {% include 'style.css' %} If not - why?
Adam Jakś's user avatar
0 votes
1 answer
1k views

How to render input value in Volt Phalcon?

I'm trying to get value of a form field but don't know what function is used for this? {{ MyForm.render("first_name") }} I want to render only first_name value not the whole input tag. FORM: ...
Dev Troubleshooter's user avatar
0 votes
1 answer
61 views

Transform Temperature into Voltage in AVR studio

I have to write a program in C, using ATmega 328p, which turns the temperature into voltage. So far I have done this: #include <avr/io.h> unsigned int Ctemp; unsigned int Ftemp; int main(void)...
Mind Map's user avatar
0 votes
1 answer
179 views

Phalcon How to change template extension from phtml on html

I will want to change template extension from .phtml to .html, but my attempts has failed. $this->view->registerEngines([ 'html' ]);
Yuri Danilov's user avatar
0 votes
1 answer
197 views

Phalcon Volt adding variable name to input

Ok so this is my code: {%for language in languages %} <div class="form-group"> <label for="{{ language.getLanguage() }}">{{ language.getLanguage() }}</label> {{ ...
user1547410's user avatar
0 votes
1 answer
835 views

Phalcon pass object from controller into view

I'm new in phalcon and I wonder what is correct way to pass some data from controller into view from database. For example $lastOrder = LeaOrder::findFirst([ 'conditions' => 'user_id = ?1', ...
boosterV's user avatar
  • 119
0 votes
2 answers
432 views

Display more of a hidden text on button click, php, phalcon

I have a table that displays items from a database. One of the items is a description so it can be very long.The thing I'm having the most problem with is how can I use JS and HTML smoothly in my ...
Birdy Kun's user avatar
0 votes
2 answers
343 views

Phalcon Volt - Multiple Inheritance

Is there any way to use multiple inheritance in PhalconPHP Volt? I'd like to do something like that: // index.volt <!DOCTYPE html> <html> <head> ... </head> <...
Robin71's user avatar
  • 403
1 vote
1 answer
222 views

Auto fill radio button in volt template without using model

I rendered elements of a form in volt file using below code. I want to auto fill the default radio button. <div class="form-group" > <div><label>Gender *:</label> <...
Amit Verma's user avatar
1 vote
1 answer
209 views

Phalcon 3 caching parsed template but not returning it

I'm having trouble migrating from Phalcon 2.0.x to 3.1.1 - when I try to compile the template with Volt, the returned output is empty. The even more interesting thing is that the correctly parsed ...
Veselin Bakov's user avatar
0 votes
1 answer
103 views

Perform merge between views of two or more modules

I have a Phalcon PHP modular application. I am making an administrative interface to control which modules should be used in the system. One module controls the application's default interface, while ...
Erick Major Dos Santos's user avatar
0 votes
1 answer
874 views

Adding id and attributes to Form element, Volt engine and Phalcon 3

I was trying to add an id to form element in Phalcon using volt syntax. But never found a solution for it. Here is how I render the form: {{ form("admin/saveSettings", "method": "post") }}
Bimal's user avatar
  • 875
1 vote
1 answer
348 views

Dynamic css classes (angular like) in phalcon volt

Is there a way to selectively apply a class in volt (the Phalcon template engine) based on variables? I have come to working in volt from js libraries like Angular and Vue, which have structure like:...
Frazer Wilson's user avatar
1 vote
1 answer
771 views

Phalcon / Volt dynamically build/render common template areas (partials)

I'm starting a project using Phalcon framework with Volt as a template engine. I have some experience with Symfony/Twig. I read documentation and tried searching all over the internet but can't find a ...
CtrlAltDel's user avatar
1 vote
2 answers
1k views

How to check if some number is in_array in PhalconPHP volt?

I am looking for a in_array function equivalency in volt. Is there another way to do this? {% for modelObj in modelList %} {% if modelObj.getId() in modelIdCheckedList %} {{ check_field('id[]',...
Guilherme Sathler's user avatar
1 vote
1 answer
896 views

Phalcon access dynamic variables in Volt View

I'm currently studying phalcon and volt for a project. Anyone knows how to access dynamically the variables in the view page? For example, I have this in my controller $arr = array('a','b','c','d'); ...
user1149244's user avatar
0 votes
1 answer
729 views

Volt - templates extending

I use Phalcon PHP and Volt Template Engine and I got problem with templates extending. This is what i want to do: Base template: // index.volt <!DOCTYPE html> <head> [...] </head> ...
Robin71's user avatar
  • 403
1 vote
1 answer
140 views

Phalcon - render controller from view

Is it possible in Phalcon to render controller from view with Volt? Like it is done in Symfony: {{ render(controller('AcmeArticleBundle:Article:recentArticles', { 'max': 3 })) }} Purpose: create ...
Sam Ivichuk's user avatar
1 vote
3 answers
1k views

phalcon volt "javascript_include" how to add async or defer in the include URL

when i use this line of code in .volt {{ javascript_include('https://maps.googleapis.com/maps/api/js?key=AIzaSyBizbimR5WObPb2Euy4ICC-dZp8Mm7Y7cM&callback=initMap') }} in view source of the ...
Muhammad's user avatar
  • 3,199
1 vote
2 answers
1k views

What is VOLT macro for rendering a <form> tag?

In Phalcon one can create a custom form extending Phalcon\Form\Form. This class has method called setAction, but I cannot find any info on how to automatically render a <form> tag with action ...
TaurusHORN's user avatar
1 vote
1 answer
241 views

Jquery after click and load it copy and paste part of HTML

I am here with a good problem that I don't know how to fix it. I was putting some javascript inside my volt file and when I asked to click it works and load the page but the problem is that also copy ...
user avatar
0 votes
1 answer
85 views

Phalcon view controller is not controlling the view

I'm programming an admin web ui for a online system, I managed to mount a url to the view using, $app->get( "/main/index", function () use ($app){ //no echo here ...
tomriddle_1234's user avatar
0 votes
1 answer
1k views

How can I validate a date in a form in Phalcon?

I build a webpage using the framework Phalcon. I have a form asking for a text, an integer and a date. I'm using datepicker (https://jqueryui.com/datepicker/) to get the date. When I make the ...
Andrés Córdova's user avatar
0 votes
1 answer
408 views

Phalcon rendering half the page/rendering weirdly

^What my page looks like. For some reason I get this error PHP Fatal error: Uncaught Error: Call to a member function getHash() on null in /var/www/html/coinpot/application/views/index/index.volt....
Recon's user avatar
  • 618
2 votes
1 answer
430 views

phalcon count by id in volt

I'm facing problem in Phalcon. in my blog i have a category table there have all list of category like "a,b,c,d,e,f,g,h,i" and in my blog table have a column name category. in category column i'm ...
baby machinery's user avatar
2 votes
1 answer
2k views

Phalcon view not loaded

I'm trying to load a template in PhalconPHP (v 2.0.13), but even the simplest example doesn't seem to work. I'm trying to access http://www.mysite.dev.fb/forms/ in this example. Here is my router: $...
Veselin Bakov's user avatar
0 votes
2 answers
1k views

Phalcon Volt, how to print translation with a variable

I'm using Phalcon with Volt for my multilanguage application. I've setup a translation file which contains the following variables: 'numbervalidation-field' => '%field% is a number', 'Teams' =>...
Pablo Santamaria's user avatar
0 votes
1 answer
2k views

Phalcon Volt Array is of string type

I have a Phalcon volt template I wanted to call in my custom helper, it will accept an array but the array sent to the helper is of string type. In my list.volt I have this code, {% set myfolder = ...
user1149244's user avatar
1 vote
1 answer
1k views

Phalcon & Volt: Adding hasMany()/belongsTo() conditions, and counting linked rows

I have two tables in my database, form_settings and webmaster, that are on a one-to-many relationship, and this has been defined in their Models. FormSettings.php class FormSettings extends \Phalcon\...
mpdc's user avatar
  • 3,560
2 votes
1 answer
213 views

Sending variable from volt to custom function

I have created a custom function I can access from the volt. The function seems to work fine, but I cannot manage to send the variable to the function. It sends the variable as text instead of its ...
Alvin Bakker's user avatar
  • 1,476
-1 votes
1 answer
331 views

Eonasdan Datetimepicker with Ajax and Modal Pop Up

Datetimepicker bellow the modals on Ajax.. Datetimepicker can show if i dont use Ajax, here is the picture without ajax (in Modals) : But it will show from the bellow of Modal if i use Ajax : I ...
code K.O.'s user avatar
  • 171
1 vote
1 answer
874 views

entity number formating in phalcon form volt

Problem : I want to render form text with formatting value. Case [input:text] // this is text input [5000] // this is my text input without number_format() [5.000] // this is my goals ...
code K.O.'s user avatar
  • 171