-
Posts
2,780 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Macrura
-
Create a Module: image upload to another page and autocomplete
Macrura replied to Qualtext's topic in General Support
thanks, i hadn't noticed there was actually a module (thought it was a mockup)- 7 replies
-
- image
- autocomplete
-
(and 2 more)
Tagged with:
-
Create a Module: image upload to another page and autocomplete
Macrura replied to Qualtext's topic in General Support
i didn't study your posts, but i'm pretty sure what you are doing is all easy to accomplish with the Selectize input field; i do that all the time, in fact i have (e.g.) a media select field that dynamically shows all of the media in my media library, including the media type (image, file, audio, video) and can dynamically show images if/when they exist, as well as image dimensions, and any other info. Maybe take a look at this and see:- 7 replies
-
- 1
-
-
- image
- autocomplete
-
(and 2 more)
Tagged with:
-
<?php function renderUkGrid($page) { $summary = truncateText($page->product_description); $out = "<div class='uk-grid uk-grid-large'>"; $out .= "<div class='uk-width-medium-1-3'>"; $out .= "<div class='uk-panel uk-panel-box prodotto__panel-mod'>"; $out .= "<div class='uk-panel-teaser'>"; $out .= "<div class='uk-cover-background' style='background-image: url({$page->product_image->url});'>"; $out .= "<img class='uk-invisible' src='{$page->product_image->url}' width='600' height='400' alt='Placeholder'>"; $out .= "</div></div></div>"; $out .= "<a class='prodotto__panel-links prodotto__panel-links-blue' href='{$page->url}'><span>Discover more</span></a>"; $out .= "</div>"; $out .= "<div class='uk-width-medium-2-3'>"; $out .= "<div class='prodotto__descr'><span>{$page>product_options->title}</span>"; $out .= "<h3 class='shadow-blue'>{$page->title}</h3>"; $out .= "<p>{$summary}</p><p><a href='{$page->url}'><i class='uk-icon-chevron-circle-right uk-margin-small-right'></i>Link</a></p>"; $out .= "</div></div></div>"; return $out; } foreach($page->children() as $grandchild) { if($grandchild->children()) { foreach($grandchild->children() as $child) { echo renderUkGrid($child); } } else { echo renderUkGrid($grandchild); } } i think this is how i would do it, or i wouldn't use a function, and have a partial for the markup and then do a wireRenderFile(); in either case i would keep the markup out of the loop..
-
This isn't tested, but i use this general sort of thing all the time to change page URLs. It is within the hook function that you need to deal with your logic of when to add the .html and when not to, you will need conditional statements... /** * This hook modifies the default behavior of the Page::path function (and thereby Page::url) * * */ wire()->addHookBefore('Page::path', function($event) { $page = $event->object; if($page->template == 'something') { $event->replace = true; $event->return = $page->name . '.html'; } }); Snagged from here originally:
-
hooking into page path allows you to change that; so you can add .html if you want; you also need to code in some logic about what happens with directory indexes
-
some quick options: check for url segment 'news.html' off the root and then render the /news/; for 'my-fist-post.html' you could grab the url segment in the /news/ template, explode it at the period and then use the first part to find and display the post. you'd need to hardcode the links or do a hook on the page path to rewrite the URLs of the pages
-
@ethfun - if you are able to figure out how to dynamically change the smtp creds let me know - that would be super useful; for example i am doing a lot of CRM type of builds on top of PW these days, and sending email needs to be flexible to where you can change the sender and have that use a totally different account; Currently i use a modified version of WireMailMailgun which has the functionality to change those things before you send.
-
I can also confirm that ecwid is good and could work easily with Processwire; i have used it on several sites. The main reason why you might want to use FoxyCart or SnipCart over ecwid is that in Ecwid (at least the last time i used it) you have to setup the products within the ecwid interface, as opposed to defining your products within PW. Part of the reason for using PW as the basis of an ecommerce site would be to take advantage of custom fields, and being able to code your own logic for all of the product's attributes, everything from images to pricing, variants, stock, etc. So if you used ecwid then you'd need to double enter the product details; Where ecwid can excel would be on simple sites where you just need to add a few products and don't care about using custom fields.
-
@MaryMatlow can you provide both your php code and the output code. Without seeing that there's not much anyone can do to help.
-
You would need to post your question on the FormBuilder support board, which you should have access to if you are a registered FB user.
-
Agreed Padloper is great if you need to keep it all in PW. There is also FoxyCart - great system, rock solid, flexible, easy to use, and a breeze to implement on Processwire.. (see katonahartcenter.com, ohmspeaker.com for examples)
-
nope, it doesn't work – latest AOS, latest PW, just stopped working on 2 sites. I can get you access if you want to check it out, or let me know what i should be looking for;
-
Bug report: AOS column break stopped working - is it me? I have the field and all of my editor pages suddenly stopped having the column breaks.
-
Folder structure into Template Folder not working..
Macrura replied to Junaid Farooqui's topic in Themes and Profiles
AFAIK the template files that connect to PW templates need to be in root, and that's a good thing; you wouldn't want it looking in folders where you might have hundreds of other php files. So your clean template folder will only have PW template files in root and all others in folders.. -
Seems aos column break...broke?
-
wow thanks, though i tried it just now and it doesn't work for me...
-
there are some discussions and instructions on how to do this in the forum somewhere; i think this was the recommended way: $cloneFromTable = $page->repeater->table; $cloneToTable = $page->table; foreach($cloneFromTable as $row) { $row->id = null; $cloneToTable->add($row); } in other words i think you have to iterate the rows from the old table to the new table; AFAIK there is no way to copy the whole thing at once, unless something changed since the last time i needed to do this. You might want to check over in the Profields Table forum about this specifically.
-
Tracy shows these notices on the page tree: 17× PHP Notice: Undefined index: ListerTweaks_options in .../modules/AdminOnSteroids/AdminOnSteroids.module:452 17× PHP Warning: in_array() expects parameter 2 to be array, null given in .../modules/AdminOnSteroids/AdminOnSteroids.module:452
-
[Solved] Page Tree giving an error (doesn't work) PW 3.0.39
Macrura replied to Xonox's topic in General Support
Have you checked the folder and file permissions, after uploading? -
looks like it is back up, can't see any issues from here. https://en.wikipedia.org/wiki/ProcessWire
-
strange issue, not sure what's going on, but if i have this module installed, i can't see the uninstalled modules, therefore i end up needing to disable the module to install new modules (?)
-
wow thanks guys for SOTW (news 128) , had completely missed that somehow! Also forgot to mention the credits page https://www.elliottcarter.com/credits/ where thanks to all forum members, and a few folks who really made this project possible during it's development and helped me on the forum, and also just by their modules and/or advice, @ryan, @LostKobrakai, @Martijn Geerts, @adrian, @teppo, @netcarver, @horst, @kongondo, @Soma (and at some point i still have to figure out how you make those cool images with the screenshots/devices, always have trouble with that...)
-
and in my example, it only works if you want to columnize the whole field, else you also need to extend that function to have a row/section break
-
ok thanks
-
ok thanks, only thing is, how do i fix this, without version change