Jump to content

toni

Members
  • Content Count

    32
  • Joined

  • Last visited

Community Reputation

10 Good

About toni

  • Rank
    Jr. Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Dear @adrian sorry for noise. With some rubber duck debugging ... it was a typo. Shame on me ;(
  2. hi @adrian. mhhh yep this is what I did so there must be something else wrong 😕
  3. Hi, I have persons using template person. I have events linking to persons using a template event. By now on a person detail page I'm looking for events like: $page->references() and in my loop I'm checking if the item has template "event" {if $item->template == "event"} smarty 😉 Is it possible to do this in one step? ~ ->references('template=event') I must admit I do not really got the idea of $field. Thanks!
  4. super great! thanks a lot for your help @adrian!
  5. Hi all, I'm trying to get children of a page not matter if hidden or not. This is how I do: $media_tags = $pages->get("template=fundus-index,include=all")->children("sort=title"); The children I'm looking for name 'Video,Bilder,Audio, Text' (as screenshot attached shows). The moment I uncheck the 'hidden' attribute of let's say video it's showing in my search. Can one kindly shade light into what I am doing wrong with ->get() thanks!
  6. this can be closed (cannot find a close button 😕 time to shut down the computer.)
  7. Hi, I'm using the excellent Template Engine Factory from @Wanze and Smarty. One thing I can not figure out is how to use pw's `__('…')` translate function within my templates. This is how I tried: /site/templates/views/fundus-index.tpl <a href="{$page->httpUrl}">__("zurück")</a> <a href="{$page->httpUrl}">{__("zurück")}</a> I would expect to find `fundus-index.tpl` in translatable files. Unfortunately it does not show up even after refreshing the list (screenshot attached). When trying to enter the file directly I get a warning saying: ProcessLanguageTranslator: That file has no translatable phrases After that I've tried to setup a new php file `/site/translations.php` with content `__("zurück")`. This file shows up and I can successfully translate the string which I would expect that this string is globally available across all files (missing knowledge regarding the usage of translations ;) However my template file does not care about this newly created translation. So long story short. How can I use translations in smarty templates? Best regards, Toni
  8. Got it 😉 the field itself allows the output definition...
  9. Hi, templates the definition of fields shown in page lister. For example one can define {title}, {surname} to be shown. However, when choosing a datetime field {enddate} it's timestamp will be shown. How can I format the timestamp as readable time?
  10. ... and also in addition to a json object as I suggested above you could also simply use a plain textfield and store your ini there like: [names] me = "Hello" you = "World" [urls] first = "http://www.example.com" in your template you could access it as array with: print_r(parse_ini_string($page->ini)) Array ( [me] => Hello [you] => World [first] => http://www.example.com )
  11. @Vigilante A config page with simple textfields for storing settings might be the best way to go. Another option would be your config.php . But in your case this is rather inappropriate as it might be hard to edit for your client. By the way instead of creating several fields in your config page you could also create one text field and put a json object in it which you could access and parse when needed. (provided the customer can handle json.)
  12. Hi @Fanni, a little late and only litte information but here is my guess. As you say the error message points to thumbnail creation from pdf. Behind the scenes following modules are most likely used: Imagick (Php Extension) Ghostscript (PDF Interpreter) and maybe ImageMagick From other non-processwire projects I've experienced a similar behavior caused by the used ghost script version. So ghostscript is where I would start. (You can read about a similar issue here: https://stackoverflow.com/questions/53560755/ghostscript-9-26-update-breaks-imagick-readimage-for-multipage-pdf) You could check your gs version under linux with something like ` /usr/bin/gs --version 2>&1 on a shared host phpinfo() might tell you the used version as well. If not your hosting provider will for sure tell you.
×
×
  • Create New...