-
Posts
7,529 -
Joined
-
Last visited
-
Days Won
160
Everything posted by kongondo
-
This could be someone who probably develops PHP apps using Laravel and has probably never even used ProcessWire. I'd expect something similar from a developer whose tool of choice is WP ?. So, unless they show you some benchmarks, I wouldn't necessarily believe it. Having said that, I don't know if ProcessWire is faster than Laravel or not. About stability, ProcessWire is very stable and reliable, although I am not sure what definition of stable we are using here. This really depends on your needs. I don't understand what you mean by 'wanting to setup a directory'. Both ProcessWire and Laravel have their strengths depending on the type of application or website you want to build. Laravel is a fine piece of kit just like ProcessWire is, however, the entry levels differ as well as their out-of-the-box experiences. The fact that you went to Fiverr tells me that you want somebody else to build the 'directory' for you? In that case, ask yourself questions such as long term support: which system (community) will serve you better in this case? E.g., if your developer 'vanished', will you still be able to use the system, get the support needed? What about scalability? Are we talking hundreds, thousands, millions of records/pages? There are many other questions but rather than throw the kitchen sink at this, maybe tell us a bit more about your 'directory' ?. Just my 2p.
-
Hi @panx, Apologies for the issue you are facing. @toni's issue was resolved by following steps similar to what you tried above. It was caused by the ProcessWire tags issue discussed here and reported here. I have now set up a troubleshooting guide (WIP) in the documentation to help with this. Please try that first and let me know if your issue is still unresolved. Thanks.
-
Interesting. Today even saving twice didn't work for me. I had to do it about 7 times!
-
@fruid, do you not have access to the ProFields forum?
-
Filed an issue here: https://github.com/processwire/processwire-issues/issues/1287
-
Hi @toni, I already responded to your query that you sent via email this morning ?. This was 7 hours ago. Maybe my email ended up in your spam/junk mail folder? Please have a look. Thanks.
-
building navigation menu beyond the page tree list structure
kongondo replied to adrianmak's topic in General Support
Yes. Please see the links to the gists found here in the documentation. For any further MB-related questions, please post in its support forum. -
building navigation menu beyond the page tree list structure
kongondo replied to adrianmak's topic in General Support
Actually you can use MenuBuilder for very complex menus by using the getMenuItems() feature ?. You could even use Macrura's recursive function with it (adapted, of course). -
Quick question, why are you cloning the pages? What properties/fields of the cloned page will you want to keep and which ones will you want to edit? I suppose you might want to edit to change the title (and possibly name) of the cloned item. The reason I am asking is that IMO, for your specific use case, I don't think the ProcessPageClone GUI/form is very user friendly (?). Won't questions/information about a new page being created/cloned be confusing to your editors? Secondly, how do you intend to reload the page after the clone is finished? I am thinking maybe that a minimal custom form with say, only an input for the title for the incoming/new page table item should suffice? You would then process the form via ajax, close the modal and append details of the newly created item to the PageTable table without reloading the page. You would obviously need an endpoint to process the form, clone the page and create a new Page Table item. Just some thoughts. I don't know the whole context so my ideas may not be feasible ?.
-
I now get you, fully. What you need is to add the page to the page table field. You need to add it like you would an item to a PageArray or WireArray. Something like this: <?php namespace ProcessWire; $pageWithPageTableField = $pages->get(1055); // page with the page table field you're adding the new (cloned) item to // $clonedPageTableItem = $pages->get(1059); // can add as ID as well $clonedPageTableItemID = 1059; $pageWithPageTableField->of(false); //$pageWithPageTableField->your_page_table_field_name->add($clonedPageTableItem); // @note: here you can first check if this page table field already has this item and skip in that case, just to be sure $pageWithPageTableField->your_page_table_field_name->add($clonedPageTableItemID); $pageWithPageTableField->save('your_page_table_field_name'); You will need to hook somewhere and this has to be after your page has been cloned. Maybe try hooking AFTER pages:cloned? You will need access to the IDs 1055 (page with the PageTable field) and 1059 (cloned page for used as PageTable item) in my example.
-
Hi all, To those who have asked questions, just noting here that I have seen them and will answer you when I get a bit of time. I will respond by editing the first post, whenever possible, just so we have Q&As in one easy-to-find location. Thanks.
-
Prevent image resizing in PW CKEditor image dialog
kongondo replied to DrQuincy's topic in Getting Started
Yes. -
@Orkun, I have looked at the ProcessPageClone code and it should clone to the correct parent of PageTable Items. Did you try it? Looking at this code (where the page is cloned) found here: <?php namespace ProcessWire; $clone = $this->pages->clone($page, $page->parent, $cloneTree); You can see ProcessWire will preserve the parent of the page being cloned. Since you are cloning a PageTable item (which is a page), ProcessWire knows and will keep its parent (i.e., in your example, the parent page of PageTable items, with the ID 2133).
-
I get you now. I have never used that module before, hence the reason I didn't recognise the /clone/ url. Let me install the module, have a play and get back to you.
-
This is the important part for me. What exactly happens here? How are you cloning the page? Could you show us some code? It is here you might need to tell ProcessWire the parent page, hence the parent_id.
-
Let's back up a bit. How are you cloning the page?
-
Not exactly what you are describing but maybe Robin's module could be of help? At least for editors. It can do captions.
-
If using the API, you can get it like this. There are probably other (better) ways. <?php namespace ProcessWire; $myPageTableField = $fields->get('your_page_table_field_name'); $myPageTableFieldParentID = $myPageTableField->get('parent_id'); Alternatively, if you have to, you can also get it from the markup wrapping the 'Add New' Button: <span class="InputfieldPageTableAdd" data-url="/hooks/page/add/?modal=1&template_id=29&parent_id=1056&context=PageTable"> <button class="ui-button ui-widget ui-corner-all ui-state-active ui-state-default" name="button" value="Add New" type="button"> <span class="ui-button-text"><i class="fa fa-plus-circle"></i> Add New</span> </button> </span>
-
Can call this a bug then? It broke Media Manager, btw.
-
That has been my guess as well. That was my observation as well, only difference being I was saving (like twice) before it would catch.
-
Thanks to testing. I forgot to mention, it will look like it works but it doesn't. The setting is saved for the field, however, the database is not altered. A new column 'tags' is not created. In fact, if you edit a page using your field, you should get a PDO error about unknown column field_your_field_name.tags in field list ?.
-
Hi, Could someone please show me how to create a new file or image field using the API and enable tags as well? It used to work a while back but I am not sure what changed. It seems I can only enable tags using the GUI and only once the field has been added to a template. In addition, it seems one has to do it twice; First enable tag, then disable them then re-enable them! I am talking about normal tags (user enters tags by text input). <?php namespace ProcessWire; $f = new Field(); // ... more code here $f->useTags = 1;// does not work, even if I do this after adding this field to a template $f->save(); Relevant method in FieldtypeFile.module: updateDatabaseSchema() Edit: Just updating this. The above code will look like it works. The field will save the setting use tags. However, the field's table will not be altered, i.e. the column 'tags' will not be created. Editing a page that uses that field will throw a PDO error: unknown column field_your_field_name.tags in field list. Thanks.
-
Still not 100% sure what you are saying but I'll assume you have a menu builder menu with 3 top level items (1, 2 and 3) and you only want to output the children of the top level item 2. I'll also assume you mean you want to control this programmatically, i.e. not disable the other menu items in the MB admin. If this I got it right...the easiest way of doing this is via getMenuItems(). Use getMenuItems() to get your menu. Better if you use the option to return a WireArray menu object. Let's call this $menu. Filter / find the children of item 2 inside $menu using their parent ID, e.g.: $items = $menu->find("parentID=10"); where 10 is the ID of item 2. Build a menu using $items. For a simple 2 level menu (i.e. 2 and 2.1, 2.2, etc), you can use a loop (foreach) to build the menu. Otherwise, have a look at these gists for example recursive functions.
-
I understand the question but I don't understand the context. What do you mean by this? Do you mean: That is the structure of a menu you've built using Menu Builder? OR That is the structure of your ProcessWire page tree?
-
Padloper 2: Early Alpha Preview + Roadmap Please see the latest announcement here: