Jump to content

Sten

Members
  • Posts

    63
  • Joined

  • Last visited

Everything posted by Sten

  1. Thank you Dragan, I do that then i want to transform data to display in my template : $view->set('categorie',${"cats_".$lang}[$page->cat]); Here I have an array for each language. $page->cat displays an integer, I tested it. If I replace $page->cat with an integer to test, it works but with the expression as a key, it does not work.
  2. Hi, I have a lot of difficulties with getting a field value. First I created a template, inside I created several fields two fields are a dropdown select box So I have a value and a label for each line. Then I want to get the field value in _init.php or in the template to display it. How can I get the value of a field for the page ? I need to understand the flow through which data goes. Could someone help me ? Thank you
  3. Thank you Robin for your help, I will follow your advice and see the Adrian's code to create this module this month.
  4. Hello, I still did not solve my problem about Hebrew letters. In fact, it is ok for Russian for example to have a transliteration of characters (one to one) but in languages like Hebrew, Arabic, it is better to slugify with phonetic like here : use EasySlugger\Utf8Slugger; $slug = Utf8Slugger::slugify('日本語'); // slug = ri-ben-yu $slug = Utf8Slugger::slugify('العَرَبِيةُ‎‎'); // slug = alrbyt $slug = Utf8Slugger::slugify('עברית'); // slug = bryt So I am planning to insert https://github.com/javiereguiluz/EasySlugger Should I create a module or just add a hook ? I am a PW newbie. Thanks for your help
  5. Well I saw about /module/edit?name=InputfieldPageName So has someone a list for Hebrew transliteration in latin letters ? Thank you
  6. Hello, This is not directly about language module but I think I can get information from you. Can I add a vendor module to have all languages written automatically into name? I used this vendor module which is good with any language (hebrew, arabic...). How could I add it, so admin interface can use it ? Thank you
  7. Yes Thank you Wanse. Yes it works. Well I will use this way.
  8. Hello Jmartsch and Wanze, It is great to be assisted, thank you ?. I changed my config to have the global file field empty. So I put all my *.twig files in the views directory. I created partials directory for parts included in base.twig. So I keep home.twig and engagement.twig in views. in home.twig I have {% block home %} <div id="corps"> <div id="titres"> <div id="titre">{{ page.title }}</div> </div> <div class="hr"></div> <br> {% block engagement %}{% endblock %} {% endblock %} In engagement.twig, I have {% extends 'home.twig' %} {% block engagement %} <p>His cognitis Gallus ut serpens adpetitus telo vel saxo iamque spes extremas opperiens et succurrens saluti suae quavis ratione colligi omnes iussit armatos et cum starent attoniti, districta dentium acie stridens adeste inquit viri fortes mihi periclitanti vobiscum.</p> <p>Mensarum enim voragines et varias voluptatum inlecebras, ne longius progrediar, praetermitto illuc transiturus quod quidam per ampla spatia urbis subversasque silices sine periculi metu properantes equos velut publicos signatis quod dicitur calceis agitant, familiarium agmina tamquam praedatorios globos post terga trahentes ne Sannione quidem, ut ait comicus, domi relicto. quos imitatae matronae complures opertis capitibus et basternis per latera civitatis cuncta discurrunt.</p> {% endblock %} But still engagement block is not displayed.
  9. Hello @Wanse and all of you, This plugin is a must, thank you Wanse. For 2 days I have been searching, I guess I have a pattern problem with my twig templates. My global template is base.twig Inside I have {% block home %}{% endblock %} and several includes parts. Nothing from this block is displayed. It works only if I keep my global template file field empty. In my home.twig I have {% extends 'base.twig' %} {% block home %} <div id="corps"> <div id="titres"> <div id="titre">{{ page.title }}</div> </div> <div class="hr"></div> <br> {% block engagement %}{% endblock %} {% endblock %} What do you think ? In my base.twix I have all my html code... Thank you
  10. Hello Sephiroth, Thank you for your tutorial, it is very precious although this code above does not work for me. I had {% block content %} {% endblock %} which had no problems but did not display the block content. Thank you for any help. Sten
  11. Hi, Is it possible for home.twig or any other template to be inserted inside a other larger template which is like an empty enveloppe, a template parent ? And at the same time to have placeholder from several part ? Thank you
×
×
  • Create New...