-
Posts
6,798 -
Joined
-
Last visited
-
Days Won
158
Everything posted by Soma
-
Hey, I just installed my teflon admin template on a new project (latest PW). I have installed german in the admin. For some reason, mos/some of the translations doesn't take effect. For example the topnav stays english. If I take the default admin theme, it works. Now, one would think then it's a problem of my admin theme. BUT wait! When I copy the default.php and topnav.inc from the core theme to my theme it still doesn't work. Also I made it multilang a while ago and it was working until now. What could be the problem? Have you changed anything Ryan recently? EDIT: tried again, and copied the wire/templates-admin to my site folder and the topnav suddenly doesn't translate anymore. So I guess it's a bug with custom admin themes not being parsed right.
-
if you set the image to be max width 300px (it will scale bigger picture uploaded to 300px), then in the template there's (form that code) $nextImage = $image->getNext(); $prevImage = $image->getPrev(); $sizedImage = $image->size(900); So it will get upscaled to 900px.
-
well it's always good to have responsive name *)
-
marcin, it has nothing to do with PW cache, which is not enabled by default anyway and only for frontend. PW has no cache, we were talking about browser cache there.
-
Ahh, no the lang code wasn't there. Now changing it to "de" it doesn't work. I think best maybe would be to no put codemagic into core TinyMCE like Ryan did. So one can decide to use it and put it in site folder (using this technique here with my update) and if the language for codemagic doesn't exist, one can do/add it.
-
I feel so lonely....
-
There's no german translation for codemagic either. It just loads en.
-
apeisa, thanks for testing. Is this with this update, or the latest PW where ryan included codemagic? Because I loaded it and have german admin, but it works.
-
Thanks netcarver for setting this up! Waves
-
I already tested it and it's great addition! Also got used to it fast. The options are perfect and makes sense. Thanks!
-
That would be great ryan. Since almost any project we do ie multilingual, or german, this gets me everytime. Also when doing api generation pagename sanitizer isnt usable because of that. Having alternative function would be welcome.
-
No there's no module yet, but was discussed and mentioned a couple times. I think there's a guy doing something concerning this, but no clue what and how good it will be. http://clintonskakun...rocesswiresexy/ I'm sure something could be done with my datatable module http://processwire.c.../704-datatable/ also provides some nice, not bulk, but faster editing workflow now with the latest "wiretab" stay on tab settings feature. I know there's easy approaches doing a module for this, that would make a custom admin page output markup table with pulldowns that lets you select template and save in a row. It surely something that will come in some form sooner or later. Remember you can do some really advanced cool stuff "very" easily with PW API and modules what ever type. I also always have a tool.php in the root when developing. And do some operations via API from there. Though not something everyone is to his likes. You could also add something like following in a template and load the page: $pa = $pages->find("parent=/portfolio/,template=basic-page"); foreach($pa as $p) $p->set("template","advanced-template")->save(); or in a php with bootstrap include("./index.php"); $pa = wire("pages")->find("parent=/portfolio/, template=basic-page"); foreach($pa as $p) $p->set("template","advanced-template")->save(); Edit: corrected and simplifed code example
-
Ryan, if I import pages with special chars ,that usually get converted to page name correctly when creating new page, they get lost as the page name sanitizer doesn't take those of the page name module config into account. I think this has been mentioned elsewhere but can't search for "csv" on the forum (>3 chars limit) How would you see this possible without having 2 places? Put the config that's currently in the page name module into a "site wide" config? Or is it possible to have the sanitizer take those from the page name?
-
I thought there's some php module by default for zipzap? http://php.net/manual/en/book.zip.php though never really used it. http://www.php.net/manual/en/refs.compression.php
-
Can you give a little more infos about what happens? It's hard to just guess from "it's not working". Edit: Try find out why it isn't loading, is there any errors etc..
-
I was also thinking about this the other day while developing modules. I'm not sure about the best way but this sounds like a good way I already did in my projects (/site/libs/). Though I'm not sure what is if the one module uses the same lib as an other one, but needs an different version of it?
-
I experienced some strange behavior when editing templates. Once you do a refresh when editing it can screw up the fields added to it completely. Last time I had to delete the template completely, because it got fields added like "role" which can't be deleted once added! Really strange, it might not related to this issue here but thought I could mention it here.
-
I tend to use the breadcrumb that will open the tree again. Or sometimes use cmd click (mac) to open in new tab. Also useful I found my DataTable module that enables to edit many pages faster as I open them in a modal. But of course this would also help and I think easy to do with a module.
-
I would take this route... Make the "container" pages you're saying having a template "redirect", with only a single page field "redirect_page" with pagelistSelectMultiple input Then have the template file code: $session->redirect($page->redirect_page->url); or how about "redirect-to-firstchild". $session->redirect($page->children->first()->url); Edit: Another option would be to use javascript to set urls of first level to "#".
-
If the source URL is relative it must be relative to the requested page. Nothing special, either relative or absolute. It can get quite difficult with relative paths and not so flexible. Make sure you're the paths from the root of the web dir are correct. Paste the path into the browser and see if the body_templates.js file can be loaded Try inspecting with chrome tools or firebug if it's failing to load the file Not sure what else Edit: Also check if you're in a subdir (not web root). Then you would have to adapt the paths in the body_templates.js file with that subdir included. /subdir/site/...
-
Hah! That happens regularely including myself. The behavior (if set right) I think is correct. ( After all it's surely possible I missed something while testing ) So if you ommit pages by saying "parent!=1002", the page 1002 will have no "has_children" as there's no children to be rendered in the menu. It will only append the "has_children" class to items that really have children show up in the navigation at some point, cutting of at the max_levels or if excluded by a selector. Only side effect of it I noticed recently is if you have two navigation (top, sidebar) and set the top to max_levels 1, and render the rest of the navigation on a separate call in the sidebar. The top level won't have "has_children" class appended. But I don't know if that would make sense, needed or even possible with this apporoach.
-
Thanks diogo for the testing! Glad it works out for you too
-
renobird, can you give me more to chew? Code you use for the navigation, and the output? Feel free to send me pm if you don't want to post here. I think you mean "has_children" because there's no "has_parent"
-
Get specific page attributes/fields from pagearray set
Soma replied to Bill's topic in API & Templates
Bill I still don't get what this would do any different than simply doing this: $keys = explode("|", $pagearray); Except that this module will load on every page load. Bear with me, as I'm maybe missing the obvious. Dumb me, now I get it! It's not only about id's -
I encourage you to try the other thread, as it does the same and even more and will be replace this. I just figured a better way to include templates too. It's possible that you have PW installed in a subdir? Try the path in your browser directly, it should load the file.