jtborger Posted February 15, 2016 Share Posted February 15, 2016 Hi, Its been a while since I dived into PW. I'm still very happy PW being the CMS/F of my choice two years ago of a website I had to transform and maintain. Now I am developing a new one and I stumble upon this issue which I solved with some forum search. Its good to see the community is growing and a lot new documentation is up since I came here for the first time. Also the developments of PW are exciting! Good work ryan and all others! But even still I couldn't find the following: I wanted to render a partial, and I couldnt find any (API) documentation about the $page->render() method. I found in the forum I could give an array of options (['prependFile=>'']) and this worked. So problem solved. But since I like to see PW grow more, I wonder why is there no documentation about this feature in the docs I could find? Or do I look at the wrong place? If so please accept my apologies. But not at the cheatsheet nor at the docs section nor at the API docs I couldn't even find that render() accepted arguments. Is there a place where one can drop documentation issues and a documentation team to the rescue? I think we all would benefit if these 'hidden' options would be findable and in one spot instead of just going through the forums to find out that there is even more you can do with PW Thanks! Link to comment Share on other sites More sharing options...
pwired Posted February 15, 2016 Share Posted February 15, 2016 But since I like to see PW grow more, I wonder why is there no documentation about this feature - - - We'll what to say here ? Documentation depends on individuals who want to spare time and contribute. If something is not documented yet you can find it mentioned in threads, blog or just by looking for classes in the core. These threads can help you out what you are looking for: https://processwire.com/talk/topic/3145-multiple-views-for-templates/page-2#entry32876 https://processwire.com/talk/topic/4367-using-page-renderoptions-and-template-cache/ https://processwire.com/talk/topic/1102-to-render-or-not-to-render-thats-the-question/ http://www.flamingruby.com/blog/mapping-processwire-page-render-process/ https://processwire.com/talk/topic/1946-page-render-isnt-generating-the-same-output-as-viewing-a-page/ https://processwire.com/talk/topic/5394-page-renderfilename-confusion/ Camilo Castro documented and explains here how his wire render pattern works: https://medium.com/@clsource/the-wire-render-pattern-806bf6d6097a#.jquhbxejn https://github.com/NinjasCL/wire-render-pattern https://processwire.com/talk/topic/11199-mainphp-inflexibility/ https://processwire.com/talk/topic/11836-wirerenderfile-on-child-pages/ 5 Link to comment Share on other sites More sharing options...
jtborger Posted February 16, 2016 Author Share Posted February 16, 2016 Thanks for your reply. I know there is a lot of info to find on the forums. What I tried to mention is that I in a way do not get that some basic stuff is pretty good documented in the api docs and cheatsheet and the more conceptual stuff on the docs section, but that this quite basic stuff of methods and its arguments are not to find there. If only it would state that render($options) is available but not yet documented, one can figure out to look in the forums or the source code to see what happens there... Thats what I think would be a good to do since I understand that documentation is a time consuming and not the most popular thing to do... Link to comment Share on other sites More sharing options...
LostKobrakai Posted February 16, 2016 Share Posted February 16, 2016 It might even be, that parts of the docs are created at a time, where the render() method didn't even have any (useful) options. 1 Link to comment Share on other sites More sharing options...
jtborger Posted February 16, 2016 Author Share Posted February 16, 2016 Sure, could be. Although the docs are much more extended and more up to date than the earliest forum post I found about it accepting the options. But still could very well be. I dont want to sound like a whining boy who points out what is not right. I know I do but this is not my reason for posting this. Its mainly curiousity and the question if it is missed on purpose, if one is aware of it and is by choice of is just the way things are to be done... Dont wanna waste anyones time here. 1 Link to comment Share on other sites More sharing options...
kongondo Posted February 16, 2016 Share Posted February 16, 2016 (edited) @jtborger, You are not wasting anyone's time. The fact of the matter is that overall, there is still a lot of room to improve ProcessWire's documentation and tutorials across a range of topics spanning both basic and advanced stuff. It is something we are aware of and are keen to improve. Part of the Road Map for 2016 is exactly that...'continued and greater focus on documentation and tutorials'. Of course this does not mean everything will be done and dusted by the end of play 2016 but there should be some positive advances nevertheless. Whilst there are some great examples in the forums regarding various uses of the ProcessWire API, those cannot and should not be considered as a long term solution in lieu of proper documentation. In the meantime though, they are a good place to start if you are searching for particular answers. Welcome back to the forums Edited February 16, 2016 by kongondo 6 Link to comment Share on other sites More sharing options...
jtborger Posted February 17, 2016 Author Share Posted February 17, 2016 Thanks Kogondo for your answer and the welcome back. Great that it is a focus point for this year. I sure do understand the limits of these goals and also the great value of the forum for more advanced usage examples. But this render($options) thing seemed so obvious fundamental to me that I wanted to know what was going (or not) on about it in general. Is there a place to file 'doc' issues or is it too early for that? I'd like to turn my 'effort' from investigating 'why hasnt this not being done yet' to something more proactive and positive.. instead of just sort of being grumpy 1 Link to comment Share on other sites More sharing options...
LostKobrakai Posted February 17, 2016 Share Posted February 17, 2016 There isn't currently. But as soon as ProDrafts is a thing this should really change. 1 Link to comment Share on other sites More sharing options...
dragan Posted February 17, 2016 Share Posted February 17, 2016 The render method is relatively new and only available since the 3.0.5 dev version. (current version = 3.0.8) It's nicely explained by Ryan in the 3.0.5 + 3.0.7 release posts: https://processwire.com/blog/posts/more-repeaters-repeater-matrix-and-new-field-rendering/#processwire-3.0.5-introduces-field-rendering-with-template-files https://processwire.com/blog/posts/processwire-3.0.7-expands-field-rendering-page-path-history-and-more/ Link to comment Share on other sites More sharing options...
LostKobrakai Posted February 17, 2016 Share Posted February 17, 2016 That's not true. $page->render() is not new at all, just rendering a single field was added. 1 Link to comment Share on other sites More sharing options...
dragan Posted February 17, 2016 Share Posted February 17, 2016 Sorry, I thought it was about single fields (perhaps mistook "partials" as fields...) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now