Best way to manage customizable texts in Symfony 2? - symfony

Anybody knows what's the best way to manage customizable texts in Symfony 2 like Wordpress?
I.E: slider titles, button texts, etc....
I'm implementing a simple BD table with customizable texts and then call it (array) before render the twig, but I think that exists a better way to do this. By XLIFF files for example?
Thanks a lot! :)
PD: Symfony 2.8 version

If I understand what you want correctly, take a look at the Translation Component in Symfony. You can store your button texts in a YAML file or something similar (seems like XLIFF) is supported and use those in your Twig templates.

Related

Symfony 2.6 - Use MySQL for translate strings

I'm new in Symfony 2 and I'm trying to translate multiple strings like menus and another static content and Symfony suggest to use Xliff. I want that the web admin can add or delete languages in the backend instead of edit the code. I know how can I do that, but I'm looking for a bundle that allows manage language like I want.
There is any bundle that allows manage language from the backend and add the translations for that elements that you use on the frontend dynamically?
Thank you in advance!
Take a look at LexikTranslationBundle.

Symfony2 - How to determine which twig templates are rendered

I'm looking for an easy easy way to determine which templates are being rendered on a page. Since it doesn't look like this information is currently being logged anywhere I'm thinking I'd have to modify some part(s) of the pipeline but I'm not sure what would be the most effective way of doing it.
AFAIK symfony does not has something like this out of box.A possible solution is to add html comments in your twig files that state the file rendered. like that you can know which files buy looking to page source.

Display a list of content inside an other content

I would like to know if it's possible in drupal-7 do make a list of a specific content type into an other content.
Not sure if there is such an option in Drupal. (I jsut started to use it)
Thanks in advance !
Not sure what you want to do but maybe you are looking for the entity reference module: https://drupal.org/project/entityreference
Edit: views module is what you need: https://drupal.org/project/views
Yes the views module is the ideal choice for making customised lists of content. Its is also easier to layout these lists if you use the panels module https://drupal.org/project/panels

The Text Formatting Toolbar symfony

Hiii,
I wanted to know if there are Text Formatting Toolbar for symfony to integrate into my textareas.
Someone can help or show a path.
Thanks for your help.
I guess, you are looking for something like TinyMCE.
Your question actually has nothing to deal with Symfony2 since it is client-side oriented.
Take a look at this bundle
https://github.com/genemu/GenemuFormBundle
It adds several new form fields to symfony forms, including a Tinymce form field which is what you need.

Symfony2 custom (HTML5) date field creation

My target is to create a custom Date field (which should work with Doctrine). The main difference with the basic Symfony's one is that it shouldn't be 3 dropdowns, but one <input type="date">.
I've tried several tutorials like Symfony's book and some helpful answers here.
However the more solutions I try to embed, the more problems I see.
Could anybody write or advise the tutorial for this task?
Thanks in advance.
The date field type supports that already. Just set the widget option to single_text and voila — you'll have what you want. No need to create a special type for that. :)
In Symfony >= 2.6 they introduced a html5 option which will generate a HTML5 input element.
You can see the documentation here: http://symfony.com/doc/current/reference/forms/types/date.html#html5

Resources