Jump to content

donatas

Members
  • Content Count

    14
  • Joined

  • Last visited

Community Reputation

3 Neutral

About donatas

  • Rank
    Jr. Member

Profile Information

  • Gender
    Male
  • Location
    Lithuania

Recent Profile Visitors

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

  1. Thank you @Zeka and @bernhard! Looks like something that should do the trick! Will try these out!
  2. Hello, how would I do a multi-language website search with just a selector? I have many multi-lang fields and I want to do a search through all of them at once and through all of their language values. Is there a "selector way" of doing this? Maybe something like `title|title:de|title:it`? It seems I have seen this somewhere a long time ago but can't find in any documentation or forum search... Or the only way of doing it is by running separate searches for each language with output formatting off and then consolidating it all in one single results array? Because I still want to give users a result, even if it is in another language than current $user. Visitors mostly will be searching for specific terms that are very similar in all languages, but might be not used in one language version of a single page, for example. Or the user might not have switched language tohis prefered and did the search first, etc.. (many use cases in my situation) Example: $pages->find('title~='.$q) - maybe different operator is needed? /en/search/?q=visit = 1 results /it/search/?q=visit = 0 results Thanks for any advice!
  3. Thanks, @monollonom, that actually did it! I am very grateful for your tip. Now only to make translation .json files to be shared like that too as this is multilanguage site.. They are saved in the same /site/assets/files/ directory, but your shared hook doesn't seem to affect them. I wonder if there is a way. Probably need to hook to a different event related to translation saving in the admin.
  4. Hi, I am trying (wondering if even possible) to set a very different file folder path for my PW install. The path I want to set exist in the same server, but in another domain. Can the PW API see that far into file system? It is a shared hosting environment so no permission management options available. Also can this be achieved through .htaccess redirection? If you request a file (images mostly, but translation json files are important too) from `domain-A.com/site/assets/files/` to grab them from `domain-B.com/site/assets/files/`? I would prefer to do this through PW API, I can see the function `$config->setPath()` but it didn't work when set in config.php like `$config->setPath("files", "/domains/domain-B/public_html/site/assets/files/")`. Is there some other option to do this? My ultimate goal is to have two PW installs on different domains but one is just a "mirror" that is using the same database as the other and should use the same files structure if editors upload any images to the main (domain-B.com) website. I could use domain parking function but it then needs a more expensive SSL certificate for two domains , which I am trying to avoid if possible 🙂 (I'd like to use single domain Let's Encrypt certificates, thus I need to PW installs). Would appreciate any insight! Thanks!
  5. Hi. Something from this thread has worked for me in the past - https://processwire.com/talk/topic/9322-change-default-language-for-homepage/?do=findComment&comment=89925
  6. I have some trouble using setting() function - the setting() returns nothing in an included file. I set the setting() inside a function - could this be the culprit? _inti.php file, that is auto-included: function calendar($source){ setting('calendar', $source->id); } include_once('./_head.php'); _head.php file, that returns nothing for this setting: <?=setting('calendar')?> Is there an option to make it "global" from inside the function? API functions are turned on, and those that are set "statically" (not within function) and works fine.
×
×
  • Create New...