-
Posts
1,303 -
Joined
-
Last visited
-
Days Won
16
Everything posted by elabx
-
I honestly don't have much examples to pick from, but managed servers from LiquidWeb have worked really well for me, as others have also pointed out about other companies, support is great. Need a PHP extension installed? Just raise a ticket and done! Maybe watch out on those who don't have good support opinions ?
-
My account gets locked by 15 minutes after failing to log in. It would seem to randomly fail and sessions last very little too. Is anyone experiencing this recently? Normally I would suspect my browser but I just can't find that could affect login, except LastPass extension, and already tried disabling it before logging into the forum.
-
I'd love if someone could come and give an opinion on why InputfieldPage has a getInputfield() method? I though that object was an InputfieldPage, not a Fieldtype. I'll have to take a look with Tracy Debugger later.
-
Hahah of course! This is super valid, maybe set the value field with the addOption() removeOption() methods (I think what is actually being rendered is an InputfieldSelect, sorry for the misguidance? https://github.com/processwire/processwire/blob/341342dc5b1c58012ae7cb26cffe2c57cd915552/wire/modules/Inputfield/InputfieldSelect.module#L173
-
Form buiilder is awesome because it does all it's heavy lifting with the same Inputfield classes you use in page edits, so it is indeed an InputfieldPage! Assuming this is renderd in an iframe try this code (try it in ready.php, I'm really not sure if its the same as doing it on init.php): $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { $log = wire('log'); //The default PageArray getting selected through your field config $defaultSelection = $event->return; //This is passed through a parameter! //$forms->embed('form-name', ['contextPage' => $page]) $contextPage = $input->get->contextPage; //This would be form-builder page, where it actually renders! //which is not the place the iframe is rendered :) $page = $event->arguments('page'); $log->save("debug-pagefield", $page->name); $log->save("debug-pagefield", $defaultSelection); });
-
I don't think anything has changed since.
-
Check this out my friend: https://processwire.com/docs/tutorials/how-to-use-url-segments/ It's basically a way to not follow the routing of the page tree, so you can make up any possible route, and prepare your template's code for it, imagine this exist in the template file branch.php: <?php if($page->urlSegment1 == "es"){ $user->language = $languages->get('es'); // field output will be in spanish! }elseif($page->urlSemgent1 == "en"){ $user->language = $languages->get('en'); // fields will output in english! } I'm just not sure how multilang works without the root language segment.
-
I think you are going to have to use url segments on branch1, branch2 and the segments being the language names.
-
You can probably do this within the InputfieldPage::getSelectablePages hook, that way you can tweak the selectable pages, I'd also try tweaking the value attribute through another field, honestly can't think of the details right now but hope I have given you a hint on a possible solution.
-
[NOOB QUESTION] How to select a page in multi language environment?
elabx replied to Gadgetto's topic in Getting Started
You can do it multiple ways and that really depends on you! I will assume for now, that sidebar content wants to bring in some info from the articles section of your website. Lets say you get the idea to use the structure of the page tree to organise content and make it easy to get those articles to show on home page. So, you could pull something like this to get ten articles which are identified with the template "article" (that has title and summary fields!): $pages->find("template=article, limit=10"); Another way, could be to get all pages, whose parent has the template articles (for convenience, this template is used once throughout the whole site, to handle this parent page): $pages->find("parent.template=articles, limit=10") And another one to ask for the first page found with the template articles, and then get the first 10 children: $pages->get("template=articles")->children("limit=10"); Which is the best? It's your call! Will depend on a lot of things, just to give an example, on the last option to get the articles, I am assuming all pages under Articles, are actually articles. What if a page that is not an article exists under there?? Maybe something like: -
You could check ahead for a variable like this: $sliders = $page->blocks->find('slider=true') //Check if sliders are active if($sliders->count){ //Echo css/js } //Continue rendering
-
Could you show us a little bit more of code? I'm having a hard time understanding how the site is rendering.
-
MarkupSEO - The all-in-one SEO solution for ProcessWire.
elabx replied to Nico Knoll's topic in Modules/Plugins
If you have the required language modules installed, you just change the field type of the seo fields, look for field seo_title, and see that you can change it to other types of fields, in this case, you want Text multilanguage for seo_title, it should show up after the multilanguage modules are setup. -
Watch out if maybe ProCache was expected to be working, because it compiles Less to CSS. Happy ProcessWiring!
-
Routing on the server like you would normally do with files/folders, is not how processwire works. ProcessWire hijacks the routing as soon as any requests hits the server and the path where PW is installed, so those wire/site folders are not publicly accessible. You need to access the admin, and figure out which pages are setup in the page tree, which mainly handles the routing of the site. I insist on reading the docs above so you get a good idea on how PW works, its very simple once you dive in a little bit.
-
Ok, so you need to start from there ? Those files are used to handle the rendering of the website but they can be used in multiple ways. You would need to figure out the output strategy of the site. Do you have access to the admin? site.com/processwire? Take a look at these: https://processwire.com/docs/tutorials/ https://processwire.com/docs/tutorials/how-to-structure-your-template-files/ https://www.smashingmagazine.com/2016/07/the-aesthetic-of-non-opinionated-content-management-a-beginners-guide-to-processwire/
-
Is there any file in the followint path: /site/templates ? (path starting from root of web server). That's where the template files exist.
-
Create Field from API and give read-access only to superusers
elabx replied to markus_blue_tomato's topic in General Support
Both are possible: https://processwire.com/blog/posts/field-permissions-overrides-and-more-2.6.2/ Sorry to not bring more info right now, don't really know how to set it through the API, but surely there is a way. -
Can confirm Migrations works wonderful and the CLI too, I commonly migrate changes to 30+ sites that share the same functionality, using git + migrations CLI.
-
Adding meta-tag (Google Analytics) to front page?
elabx replied to Epileptiker's topic in General Support
Can you get FTP access to the server? -
I think that button is added through javascript so you might as well just add it in a script that runs in the admin, like this: http://soma.urlich.ch/posts/custom-js-in-processwire-admin/
-
Apparently from what I find in the searches, it's just not going to work with text fields:
-
image descriptions can't be changed in my repeaters?
elabx replied to rushy's topic in General Support
I did fix the issue but I did needed to modify apache configurations, but it is hard to tell if this is the case in your scenario and I'm guessing not being able to use ini_set() is not making things easier. I could only think of testing in another environment to see if you can reproduce and log. -
Ohh! And just read it's a custom field! I was assuming a date field and I do wonder, why not use the default date field for this? I think the selector might not be working because it's not getting saved as a timestamp.
-
Doesn't using the "=" operator work? Why use "~="? Maybe I'm not catching something.