-
Posts
1,551 -
Joined
-
Last visited
-
Days Won
16
Everything posted by Ivan Gretsky
-
Goog day! I have a Page field inside a Repeater inside a Repeater (yeah, x2). I need to determine the selectable pages for that Page field via php code. But I do not have access to $page variable from there. I can access $pages though. Is there a way to get the $page edited value? I have asked a similar question about Page field inside a Repeater inside a RepeaterMatrix, but it is in a vip forum so has a) less chance to be answered quickly and b) less chance to help someone else. Just mention it not to be banned by the moderators . I checked and the same problem repeats in either case. Promise to post a solution to the other topic if we'll produce one.
-
- 1
-
-
redirect template without a .php file to it's parent?
Ivan Gretsky replied to John W.'s topic in General Support
I do not know why do you need it? Why not have 404 on something you don't want to show anyway? Why not have a php file to do what you need if you need it? You can build a separate page tree branch just for categories (for business-categories template pages) and connect them to end-level pages like ABC Fence with page field. In this case your end-level pages should have different template and can live under business-directory, while categories themselves are elsewhere as noted above. -
Strategy for user-created data storage
Ivan Gretsky replied to bmacnaughton's topic in API & Templates
What are you suggestions about it? Only use selectors based on path? -
You just might want to consider putting this kind of stuff in your build chain with the autoprefixer postcss plugin (which is in the heart of mentioned editor plugins) so you don't need to manually run it in your editor every time.
-
When something changes you always get stressed (or delighted, if you're lucky). But changes are the nature of the webdev game we play. So better be prepared. Anyway, someone being here the 1st day probably won't notice anything . The fact that you're used to the old forum just proves how addicted to PW you are! But we can probably tune a few things. Here is my list of butt-hurting new stuff: The question-answer functionality. I think it can be turned off, but for now it still persists in some forum threads. I do not know why. New restrictions. I tried to reply in the News & Announcement forums and could not. My favorite way of using the forums has always been going through the new content list. Now I have to make a few more clicks to get to that page. If this is common, maybe but a link in the top menu? The look of that page with the timeline looks unusual to me and filtering is not as fast, but I can learn to live with that. There is too much dark colors (on the pager, for example). If there is a chance to bring that old light theme to the new forums, it would be great. The pager on the top is below the initial post. I think it previously was above it. I could not insert any smiles. I found the menu icon on the top, but nothing happens when I click on emoticons. Or is it just me? Well i did it with drag-and-drop, but still a bug. Thanks Pete!
-
Welcome to the forums, Stephan! I do not think there is a way easier than installing kongondo's module you mentioned. Other way is to write your own form markup and use appropriate javascript. There is no straightforward way to use the admin inputfield on the frontend that I know of.
-
I think that this is intended behaviour. The documentation says "contains the exact word or phrase", but does not say they have to be separated from their surroundings by spaces or some other characters. In fact that is the commonly desired behaviour as you would like to find "orange" in "orаnges" most of the time. So i think your ^=S10 selector will still find S101.
-
Maybe you need to configure what the file field object returns when there is no data attached? It is done on the details tab. Any configuration should not cause the behaviour you're describing, but still...
-
Nobody, I guess, as soon as version 2.8 becomes stable.
-
Exceeds max allowed file size error on live server
Ivan Gretsky replied to Ivan Gretsky's topic in General Support
That was kind of funny, so I decided to share... Recently I faced the same problem once again and went to the forum search for the answer. How was I surprised to find this topic by myself with a solution by myself present! Of course I did not remember that I already asked that . So I decided to come here no more. Went to github, wrote an issue and got the fix from Ryan the same day in the latest release. The moral is if you find a problem and found the solution make sure it is fixed forever in the master code, so you don't have to deal with it ever again. And the way to do it with PW is using github (issues or even better PRs). All that sound obvious, but may be not so for someone like me thinking that devs read the forums all day long looking for some stuff to fix. -
Привет M.O.Z.G! Welcome to the forums! The dependency data for a field in a fieldset is stored in fields or fieldgroups_fields (if overriden) table in data field in json. So it has to be accessible via standard WireData methods. The name of the property is showIf. Have no chance to try it, but you can get it like $field->get('showIf'); ... and you still have to process that string yourself this way. I did not find a way to get the visibility of a field dependent on other field via API though. Should be here somewhere if it exists. Try this, but I doubt it will help. Sorry for no real help) Hope someone more experienced can help out here. If you would explain your case a little further we could find a workaround. I almost never render through $page->$fields.
- 5 replies
-
- Inputfield
- conditional logic
-
(and 3 more)
Tagged with:
-
Not sire what you mean by "to compose an newsletter in the backend as a page". Write the email in textarea field? Or send a rendered output of a page via email. Anyway, both ways are possible using WireMail. And check out this awesome module by Martijn that just might be useful in this case.
-
Welcome, Mélanie! It seems like almost everybody here tend to move to the latest dev release as soon as it is possible. Maybe it is because so much new tasty features are in almost every dev release, or maybe because almost every dev release is as stable as master. I would definitely encourage you not to be afraid of the dev status in most of the cases. Maybe not for a billion-visit-per-day sites, but in most cases) P.S. But backups are still a must, you know.
-
Hello! I am using Atom more and more recently. My knowledge of this editor is limited, so I do not even know what to desire) The one thing I am still struggling to achieve is something not snippet or highlighting related and it is jump-to-definition thing, which am used to in NetBeans. Helps a lot when going through the chain of extended classes. Please share if you know how to do that. But I'll be happy to discuss anything else about Atom and PW being together)
-
Have not tried it so no gurantees. 404 page is just a page (though with it's id or name or both hard coded somewhere in the core). It is accessible in the page tree. So try to change the template of that page and write some code in template file to handle your case. Something has to be availiable there, like the url initially requested. But honestly I do not think that throwing a 404 for a product out of stock is a good idea in the first place. Maybe show some message (but with the 200 code) and handle the case in the product template file.
- 1 reply
-
- 6
-
-
Hey gentlemen! I just happen to need this kind of js on a project of my own and am experiencing some trouble with implementing it. So please post the solution here if it is possible. Or just do not go private .
-
Hey, ROBINJAIN! Welcome here, whatever country, county, location or village you're from . A user in PW is a page (almost) like any other. You can extend this page with custom fields and then retrieve the values of those fields (via $user API variable) at runtime and use them to determine, what content to show to specific user. Hope I got your question right. If not, please feel free to ask again.
-
files method getItemsAdded() always return an empty array
Ivan Gretsky replied to yuters's topic in General Support
Welcome to the forums Mr. yuters! Just a guess... the files might not be actually added to WireArray untill the page is saved. So try $this->pages->addHookAfter('save', $this, 'adminFileAdded'); -
You can use WireIncludeFile core function and pass something like $p (Page) as variable into it. In the included file you can use $p instead of $page, so it will be something like $this for ya.
-
This is a great question I was going to ask myself one of these days. So thank you, icietla! I can think of another option (that has been rejected by you straight away though) for that: using repeaters with field dependencies. I mean 1 page field to select a feature, another one (initially hidden) to display available options for that feature, and a text field for custom options. You can even put a link there to create options in place. Repeaters are not so nice as a table from the GUI point of view, but they will do the job. This way it is not so easy to make a predefined list of features.
-
How can i check if current page's children are viewable?
Ivan Gretsky replied to doolak's topic in API & Templates
How is it possible to check if a page is viewable to specific role (guest)? Need this to build a proper sitemap.xml. -
Of course the pictures add so much to it... But anyway, this is the 1st site from the forum I've sent a link to my wife to. Cool!
-
Sometimes my choice of words might not be the best one, sorry for that. I am Russian-speaking most of the times, so please forgive me. I was trying to sound rather jokingly (this very phrase is partly translated with Google translate, so might not be quite what I was really intended to say either ). I have to say that paid modules in demos are something that turns me off too. We, the free open source users do not like commercial modules being pushed at us for sure! And I remember having a doubt about PW being "blazingly fast" exactly in the same context. Damn, It is still pretty slow on my Windows Xampp. But I like it on the live servers without any cache at all most of the times. P.S. And you are lucky! Ryan himself is here on Tuesday!
-
@mikeuk: If I were you, I'd be hooked. Such a thorough answer on an insulting 2nd post from a man that does not even sell the paid modules. When I first found ProcessWire I was really disapointed with FormBuilder being a commercial module. By now I know how to build complicated forms myself, but already got a copy of FormBuilder. I am sure you'll learn to substitute ProCashe with something free like Redis, but you'll probably won't have to do it to get times faster win over Drupal. Please through at us more of those provocative posts so we can show you one of the best things on the Internet from all of its shining edges)