-
Posts
6,798 -
Joined
-
Last visited
-
Days Won
158
Everything posted by Soma
-
We started using mustache template engine with PW. Since mustache is implemented in various languages. Currently I can render anything either server side or client side with js or php and both share the same code base. Data can be either objects arrays or json whatever you like. We also use patternlabs node mustache version for prototyping and so all patterns can be used 1:1 in PW later using some simple controller system based on Classes that extend PW WireData so all API can be used. We also use terrificjs for easy modular js components. So no vue or react but just to mention that there's everything possible in PW.
-
You need to hook after not before.
- 10 replies
-
- 1
-
- page::render
- render
- (and 4 more)
-
If I look at the code on Skyscraper Demo http://demo.processwire.com I see: <button type="submit" id="search_submit" class="uk-button uk-button-primary" name="submit" value="1"><i class="uk-icon-search"></i> Search</button>
-
Ok according to L.Wittgenstein: "The world is the totality of facts, not of things".
-
The world is a sum of all its things.
-
Yeah because if you reference a page in it self, it would create a endless reference.
-
Admin under /processwire not foud - Fresh Installation
Soma replied to Alex L's topic in General Support
When I click that link I download a processwire.zip (10mb). You have to extract the content of the zip maybe first?- 2 replies
-
- 2
-
- login
- processwire
-
(and 1 more)
Tagged with:
-
$page->children() unpublished pages are still shown ...
Soma replied to jrtderonde's topic in API & Templates
Since the informations are really spare, any chance to have a look at that? Or a db dump? -
You seem to have the callback wrong. It should be a funtion not a self executing closure... (function(){}) ... dont just copy the code into the callback. A callback in this case is usually always just a anonymous function. Example: callback: function(){ ... code.... },
-
$page->children() unpublished pages are still shown ...
Soma replied to jrtderonde's topic in API & Templates
Maybe you have some more information? Code. Where is the code. What are those pages and how are they created? What is their status in DB? I can't think of anything that would cause this. -
No you asked in the correct forum, I meant the other guys. Unfortunately I also don't have an answer to your problem, except that if the result are loaded via ajax, the JS needs to be executed again somehow after load.
-
Please! You guys mix up those two modules "EmailObfuscation" and "EmailObfuscator" This thread is for http://modules.processwire.com/modules/email-obfuscator/. The other is http://modules.processwire.com/modules/email-obfuscation/ alias EMO, There's no "EMO" and such in this module.
-
Hey adrian thanks for the heads up and help! I'll look into it when I get time the next days. I'm not sure if it still is of much use anymore.
-
@mikel I guess you use the current master. This version is not supported anymore. New versions (dev, dev2) https://github.com/somatonic/Multisite/tree/dev2#add-multisitedomains this config was changed to be in site/config.php for various reasons . So the domain array is added to $config and it doesn't matter where. it could also be in a module. I'm not sure what doesn't work in your example, it could be that it is in ready.php or the hook ::add should be ::added. Just wanted to mention that this if you use the master version it won't be compatible in future versions.
-
[Solved] Language translator für editors not working
Soma replied to Soma's topic in General Support
Thanks. Ok , I found that some custom permisson system we have running is preventing the admin branch to be accessed. So it works fine.- 2 replies
-
- 1
-
- editor
- translation
-
(and 1 more)
Tagged with:
-
There's a permission for allowing editor to use the translator in PW 2.73. I could need this but it doesn't work. It shows the "Language" in the menu but when opening the page it says no entries to show. Anybody has some experience using the lang-edit permission for editor?
- 2 replies
-
- editor
- translation
-
(and 1 more)
Tagged with:
-
Some basics when working in OO software. If you print_r() a object (ie page or field), PHP will traverse the object (try to) and load all its references recursively. It unfolds the object which isn't really present in the original object and only loaded or accesses it if you would do call stuff on this object. This doesn't mean the object contains all the stuff you see printed at that time before you call print_r(). Edit: Oh a page field contains only a reference (by the id) to the page and loads the page object and not even its content unless you call it (except autojoin fields).
-
It's also perfect for xml, json, [insert any datatype] .... .
-
No it's not supported as the Module just renders the page structure. But it can be manipulated/faked in some ways with JS. And that's what I do if it's needed, cause it's a usability feature and something that doesn't really belong there, in the nature of a menu UL structure and the source. So I think it's ok to do that client side. Some example to do it. The "has_children" and "parent" come from the module and need to be removed to avoid false styling/information. $navigation = $('.wrapper .navigation'); // generate "overview links“ for each submenu $navigation.find('li:has(ul)').each(function() { $this = $(this); var classes = $this.attr('class'); var $link = $this.find('>a'); var href = $link.attr('href'); var $item = $('<li class="' + classes + '"><a href="' + href + '">' + $link.text() + '</a></li>'); $item.removeClass("has_children"); $item.removeClass("parent"); $this.find('>ul').prepend($item); }); Edit: this is recursive over all levels. So all li's that has a UL. If you only want for the first level you'd adapt the find() to find(">li:has(ul)").
-
So i think thats the problem when enabling pageFilesecure. The files suddenly cant be accessed even if published and should be accessible for a guest user cause the pages under admin are protected. Im not sure how MM works. But maybe giving guest access to MM templates in admin could solve that but not sure what the consequences are.
-
Not true, any logged in user that has edit/view access can view a unpublished page not only superusers. Add a page and upload a image. The image is in assets folder now and anyone can view that file in browser if you have the path. Even if you trash the page or unpublish page. This is where pageFilesecure comes in to avoid that.
-
Yes I tested and it's about the same ratio except all a little lower. Like 20ms - 26ms Rendertime, TTFB 130ms - 170ms
-
Testing this a little further. Stock Install, Debug off. Default Advanced Profile. MAMP PHP 5.6.10 / OPC off PW2 Boottime: ~120ms PW3 Boottime: ~80ms PW2 Rendertime Home: ~30ms (start of init, end of _main.php) PW3 Rendertime Home: ~36ms (start of init, end of _main.php) PW2 TTFB Chrome: ~170ms PW3 TTFB Chrome: ~240ms Not sure why the TTFB is so much higher.
-
My test are also a clean installs 2.73 and 3.0.42 (default profile, no changes, except File Compiler disabled) locally on same Server/MYSQL/PHP without any cache. The difference is there around 30% slower measured in Chrome TTFB refreshing a couple times to get a average. Not sure how your test results are the other way around.
-
Yep same server.