Jump to content

Edison

Members
  • Posts

    55
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Edison

  1. I am using Markup Regions in Templates and they are awesome ?. I would like to use them also in Hooks/Modules, but here I am having some troubles.? When placed in a Template File this simple snippet works perfectly. It pre-pends and combines with the main header section. The same snippet in Page::render or TemplateFile::render hooks does not work as expected. It renders but without pre-pending and combining to the header. In the html source, pw-prepend directive remains visibile, like if Processwire had not processed the markup region. May be these two events are fired too late to take benefit of markup regions? Do I need to use a different hook ? It would be nice to find some examples documenting how to use markup regions inside hooks/modules.
  2. Sometime ago I encountered a similar problem with datetime fields not saving in local language. I think the issue was on Date/Time Output Format Code (field's tab Details). While for default language it was ok to use PHP date format, for locale languages I had to change to PHP strftime format. Example: - default (English): F j, Y H:i T - locale (Italian): %e %B %G %H:%M I got the hint combining this old post with the note above Date/Time Output Format Code: "The date/time will be output according to the format below. This is automatically built from the date/time selections above, but you may change it as needed to suit your needs. See the PHP date function reference for more information on how to customize this format. Alternatively, you may use a PHP strftime format if desired for localization." Yes... a bit weird! ? I hope you can find it useful.
  3. Thank you! Sure I will give a try to language-alternate fields, they seem promising. But you are right... discussion in several languages below an article may not be so bad ? ... I will seriously think about! ?
  4. I am developing a multi-language site using PW 3.0.123 starting from Uikit 3 Site/Blog Profile. Of course Language Support modules are enabled. Normally in multi-language sites, comments placed in a page (ie: an article in English) are not showing in its translated pages (ie: the same article in Spanish), and viceversa. Unfortunately it seems that PW comments system is mixing all the comments together without considering the language version of the page where they have been submitted. The result is that in the English page you will see also the comments made to the same page in other languages (Spanish, Swedish, etc), which is quite bad. At a first sight I have the impression that FieldComments is not supporting multi-language (I hope to be wrong!). Looking inside the database, field-comments table has only one 'data' field and not multiple 'dataXXXX' fields as if it would be multi-language. This makes me think that FieldComments is not able to associate a comment to the language version of a page. Has somebody any suggestions how could I make it work? Thank you!
×
×
  • Create New...