-
Posts
6,798 -
Joined
-
Last visited
-
Days Won
158
Everything posted by Soma
-
Then in that case you would simply need to tell the module what root your menu has. Default is "/". (third argument) Most common is for example use the $page->rootParent() as the root. ($page->rootParent() will always return the root level page of the current page even if on a root page itself) echo $tree->render($options, null, $page->rootParent());
-
@surffun it's the "collapsed" => true, option.
-
This could look like this in a template $arrayData = array( "success" => 1, "products" => Array( Array( "id" => 1, "type" => 6, "name" => "product1", "title" => "Product1", ), Array( "id" => 2, "type" => 5, "name" => "product2", "title" => "Product2", ) ) ); class MyData extends WireData {} $someData = new WireArray(); foreach($arrayData['products'] as $prod){ $p = new MyData(); foreach($prod as $key => $val) $p->$key = $val; $someData->add($p); } $someData->sort("-type"); foreach($someData as $r) echo "$r->title<br/>"; $result = $someData->find("title=Product1"); foreach($result as $r) echo "$r->title<br/>";
-
I used quicksilver.js on the cheatsheet.processwire.com not sure that's what you're looking for. http://ejohn.org/blog/jquery-livesearch/
-
You could use the custom attribute options argument for radios, checkboxes etc in the addOption(). $field->addOption($key, $value, array("class" => "customEmoClass")); The rest is CSS and or JS. So you could do it like this. The label can be empty, and the $value would be the attr array. $evaluationVals = array( 'sehr_befriedigend' => array("title" => "sehr befriedigend", "class" => "smily1"), 'befriedigend' => array("title" => " befriedigend", "class" => "smily2"), 'mittelmaessig_befriedigend' => array("title" => "mittelmässig befriedigend", "class" => "smily3"), 'unbefriedigend' => array("title" => "unbefriedigend", "class" => "smily4"), ); foreach ($evaluationVals as $key => $value) { $field->addOption($key, "", $value); }
-
Note: New version 1.0.6 with a hotfix for CKEditors in inline mode not getting recognized anymore due to core and jquery changes it seems. http://modules.processwire.com/modules/form-save-reminder/
-
ProcessWire ApiGen (dynamic + up to date + all branches)
Soma replied to kongondo's topic in API & Templates
In Sublime Text i can do this by quick search "inputfield.php@___" -
Sorry for not replying. I was too busy, not only with updating this module. There's now a new dev version that fixes issues and improves some things. https://github.com/somatonic/Multisite/tree/dev For example the biggest change is that the configuration is now set in the config.php via an array in $config->MultisiteDomains $config->MultisiteDomains = array( "dev.domain.com" => array( // domain name can be used to map to root page "root" => "www.domain.com", // page name for the root page "http404" => 27 ), "dev.domain2.com" => array( "root" => "www.domain2.com", "http404" => 5332 ), ); This allows for different domain configurations on a dev and live stage, and since it's not in DB (via the module config) it can be easily transfered with a dump without worrying to overwrite or change the settings. Also there's no need to change the domain "root" pages name, as it's not directly coupled to the requesting domain. So you only change the array keys (=domain). Since the whole concept is all a pretty hack, I found that it comes with some complications that can't be solved in a elegant way. So for example the biggest issue is that you can't crosslink pages via the RTE Link plugin, since it doesn't know about Muiltisite. So you'll end with wrong URL's when for example link from a page of one site to a page of another site. If that's an issue it's still possible to copy the ProcessPageEditLink.module and modify the root parent for the page tree select. I'd be glad to help out with an example there. Further, the structure of a multisite install needs to be - Web (PW root page, I call it always "Web" since it isn't the homepage anymore) - www.domain.com (primary site home) - 404 Page - www.domain2.com (a second site home) - 404 Page ... I think I heard people were using a different structure in the current old version like: - Homepage (main site home) - About - Projects - 404 Page - www.domain2.com (second site home) - 404 Page - www.domain3.com (a third site home) - 404 Page ... But this wasn't ever recommended and it can lead to complications. ---- Again since this module is pretty much a hack, I'm not officially supporting and releasing this module. Use at your own risk. We use it in various projects now and while it works fine with all it's little drawbacks, the new version is little more solid. I would rather like to see if there's a way for a more integrated and supported way in the core. But not even sure how this could work out. Ryan may has some ideas or maybe thinks this isn't something PW could support. - Note that there's multisite core support, but it's for different DB's and "site" folders, but that's a different case altogether. Take care Soma
-
Maybe this helps: https://processwire.com/talk/topic/9346-not-all-specified-templates-are-editable-only-includehidden-is-allowed/
-
set selected values for InputfieldAsmSelect in a custom process module
Soma replied to Orkun's topic in General Support
Usually it works if you just set the "$entryPage->titel" to the value, but think it only works with the ID. Depends if you use the "ID" or the additional "value" options (id=value|title) If using value: foreach ($options as $option) { $field->addOption($option->value, $option->title); } foreach ($entryPage->titel as $value) { $valArray[] = $value->value; // array of values selected, not key=>title } $field->attr("value", $valArray); Using ID foreach ($options as $option) { $field->addOption($option->id, $option->title); } $field->attr("value", $entryPage->titel); // just passing the field (only when outputformatting off) If that doesn't work just make an array using id. foreach ($entryPage->titel as $value) { $valArray[] = $value->id; }- 5 replies
-
- 3
-
- InputfieldAsmSelect
- values
-
(and 1 more)
Tagged with:
-
I discovered this by chance and wondered why it never got answered. So here it goes: PageTable field is just holding a PageArray. You'd then use $a->remove($key) where $key can be the key or a page object. Then save the page. // remove page $item from PageTable $page->pagetablefield->remove($item); $page->save();
-
I think you could check with a <?php phpinfo() ?> to see php mods something like mod_security.
-
Make sure your post url ends with a slash.
-
Sound more like some security module installed on you server.
-
There are no alternatives afaik. Fingerprint is sometimes too much security and creates more problems than it solves.
-
Sanitizer pageName and french closing quote ("«")
Soma replied to Webrocker's topic in Multi-Language Support
https://github.com/ryancramerdesign/ProcessWire/issues/779 -
Actually I was the first to like and retweet his tweet five days ago. So all candies belong to me
-
RT @Its_CCHogan: Why I created by Book websites with #Processwirehttps://t.co/nT2K23e0FN#webdesign #webdev #CMS
-
Last time I used a "Login via Facebook", my Facebook account was hacked...
-
Nice ideas, but the doing the save new sorting like an "insertAfter" is the tricky part...
-
I don't know but manually sorting 400 pages uff..? Some kind of sort integer field to enter position in a field. Build an custom admin page for that? It's not easy anyway. And experiment with maybe grid instead of a 1 column?
-
Or little more efficent if(!$pages->count("parent=$page, my_field=0")) { echo "Sold out"; }
-
Umlauts not transcribed correctly in custom user name module
Soma replied to gebeer's topic in Multi-Language Support
Or use new $sanitizer->pageNameTranslate(str)- 5 replies
-
- 2
-
- Umlauts
- not transcribed correctly
-
(and 1 more)
Tagged with:
-
Umlauts not transcribed correctly in custom user name module
Soma replied to gebeer's topic in Multi-Language Support
Try without the "".- 5 replies
-
- 1
-
- Umlauts
- not transcribed correctly
-
(and 1 more)
Tagged with:
-
Well you still can't use something like "_title" as a column field in Lister. It's just that only the first result doesn't show the concated title, but all following result would. I haven't been able to look into it or report it. Maybe about time And {_title} in template label is very new that didn't exist back then.