-
Posts
1,065 -
Joined
-
Last visited
-
Days Won
11
Everything posted by Zeka
-
"Page Reference" field selections change based on template's location?
Zeka replied to Lance O.'s topic in General Support
Hi @Lance O. You can do it by specifying needed selector in the field options or with hook. -
Hi @PWaddict Are you sure that you have repeater items that should match your selector? Your code looks good to me.
-
Hi, Not sure, but it could be relative to notices that you have on the top of your page
-
Hi @Davidov There are two ways how to get it working $teacherItem->teacher_photo->first()->maxWidth(250)->url; Or change your image field setting to: And then you will be able to use your existing code
-
To Add more Field-Url to same template
Zeka replied to franciccio-ITALIANO's topic in Getting Started
Hi @franciccio-ITALIANO There are several ways to do that. 1. Use ProField Multiplier https://processwire.com/api/modules/profields/multiplier/ 2. Use repeater field 3. Use MultiValue Textformatter https://modules.processwire.com/modules/textformatter-multi-value/ -
Hi @webhoes You can do it in several ways $arr = $pages->find()->getArray(); $result = array_unique($arr); or $arr = $pages->find()->unique(); https://processwire.com/api/ref/wirearray/unique/ $pages->find() method returns a filtered PageArray unless an include mode is specified.
- 1 reply
-
- 3
-
Hi @pandaman I have never tried to include processwire to some other scripts, but there are docs that can help you https://processwire.com/api/include/
-
Hi @szabesz I think that if import/export functionality will be possible from API side, we will be able to easily build custom process modules with some predefined patterns for import or export. Hope that multilanguage support will be introduced as multilanguage type of setup currently is default for me ))
-
$c->of(true); $c->status([]); $c->save(); or https://processwire.com/api/ref/page/remove-status/
-
Selectors and operator for first name last name search
Zeka replied to verdeandrea's topic in General Support
Hi first_name|last_name~=John Doe -
Hi @dweeda Take a look at this thread
-
How to use language-alternate fields inside selectors?
Zeka replied to webaff's topic in API & Templates
Hi @webaff Have you tried to switch user language to lang1? <?php $currentLanguage = $user -> language; // remember language $langauge = $languages-get('lang1'); $user -> language = $language; $matches->sort("-fileField.modified"); $user -> language = $currentLanguage; // restore language ?> Maybe there's a better way to do that. -
Hi @opalepatrick Take a look at this module https://github.com/teppokoivula/PageRenderIPRestriction
-
translations.php _x('Поиск', 'General'); function _t($text, $context = 'General', $textdomain = '/site/templates/helpers/translations.php') { return _x($text, $context, $textdomain); } echo _t('Поиск');
- 15 replies
-
- 1
-
GET variable in each address returned by $page->url ()
Zeka replied to PawelGIX's topic in General Support
Ok. So you have at least two ways 1. Add custom method to page object via hook 2. Add hook to Page:path Take a look https://processwire.com/api/hooks/#add_new_method- 4 replies
-
- 1
-
- get variable
- url overrride
-
(and 2 more)
Tagged with:
-
GET variable in each address returned by $page->url ()
Zeka replied to PawelGIX's topic in General Support
Hi @PawelGIX https://processwire.com/api/ref/page/url/ // Specify multiple options (output: http://domain.com/example/foo/page3?bar=baz) echo $page->url([ 'http' => true, 'pageNum' => 3, 'urlSegmentStr' => 'foo', 'data' => [ 'bar' => 'baz' ] ]);- 4 replies
-
- get variable
- url overrride
-
(and 2 more)
Tagged with:
-
Hi $templates->find("contentType=json"); text/html = html text/plain = txt application/json = json application/xml = xml
-
is there any method to prevent a page access directly?
Zeka replied to adrianmak's topic in General Support
Hi @adrianmak When you make redirect from your form to "thank you" page, you can add some get parameter to the link like: thank-you/?submit=success and then in "thank you" page template check if there this get parameter, if not - redirect to homepage. -
Hi @Peter Knight I didn't add image field to langauge template, but I have added several custom text fields in every install, so there is no problem to add your custom fields. Just set "Show system templates" in tempalate manager filter, I think you are aware about it. As an alternative you can put your flags to some template/assets/images/flags/ and name it like default.png, english.png etc. and then use $language->name in your foreach loop.
-
You can use Facebook URL Debugger to refresh the data.
-
Okey, so it works as expected in Firefox, Opera and even in Edge, but not in Chrome.
-
Hi @adrian Thank you for your efforts in this module. I faced a problem with js in CUN on 67 line data[i]['enabledPages'] = $(this).find('input[id=enabledPages'+i+']').val().split(","); bit if I uncomment the previous line it works if($(this).find('input[id=enabledPages'+i+']').length !== 0) data[i]['enabledPages'] = $(this).find('input[id=enabledPages'+i+']').val().split(","); Variant with if statement looks more logical for me, but I'm curious is there any reason why you have commented it?
-
@titanium What browser do you use?
-
@Christophe Hmm.. In my case it works in this way: I click "clone this item", then "Ok" and I get cloned item, but if I click "Ok" again or "Cancel" nothing happens. I don't have any errors or warning in console. Could somebody check it?
-
Hi @Peter Knight 1. You can use MarkupSEO, just change type of needed field to multilanguage text/textarea ( seo_title, seo_description etc.) 2. I think yes. Can't remember if I had some issues. 3. All of my sites are multilingual and I never had a need to use a separate tree for every language. You can switch off multilanguage support on template level (Advanced tab) and there is module that lets you control whether multi-language support is enabled at the page / branch level. 4. Yes. You should read about hreflang. Also, there is "What should happen when this field's value is blank?" option in field settings. Usually, I don't inherit values from default language, because in that way I can get duplicated content ( not good for SEO ). Image and files fields are multilingual through language-alternate values