-
Posts
4,956 -
Joined
-
Last visited
-
Days Won
100
Everything posted by LostKobrakai
-
Taking content management & creation to the next level
LostKobrakai replied to dragan's topic in Dev Talk
This may be an interesting article related to the topic: http://danielmall.com/articles/content-display-patterns/- 11 replies
-
- 1
-
- flexibility
- concept
-
(and 1 more)
Tagged with:
-
The current selector syntax does not support any kind of parameters for comparisons, but you can use raw sql like described here: https://processwire.com/talk/topic/17-functionsmethods-to-access-the-db/
-
I'm currently missing a quite useful feature in the module. I've the following setup to prevent unnecessary verbosity, where client accounts are defined like so: role=client, company=SomeCompany (page field). This way I just need to define each company in a single place as well as handle the client role permissions and access rules once. Now I've a list of projects, where clients should only be able to see those projects, where the company field does hold their assigned company. This is certainly possible with dynamic roles right now, but it's introducing the verbosity that I tried to avoid, meaning I need to have at least a single drole per client. I'd much rather use a single drole to handle all clients and assign them view access like so: template=project, client=user.client. From looking into the code I think this would mostly be another "where" check for mysql queries and the runtime permission checks should be even more simple to implement. @renobird I'm not sure if you still need it, but dynamic roles do not work on admin pages (process modules). See this for a working solution: https://processwire.com/talk/topic/6822-module-dynamic-roles-for-pw-246/page-3#entry98415
-
Page Field vs. PageTable Field differences
LostKobrakai replied to Jonathan Lahijani's topic in General Support
Reusing existing pages in pagetables is also possible when using the api. There's just no interface for that, but you could create something like kixe mentioned, but the other way around: add the page chosen in a page field to the pagetable. -
setup local machine to test templates, etc
LostKobrakai replied to jon9china's topic in Getting Started
Depending on the setup of the server as subdomain might need another rewritebase in the .htaccess file. -
I'd additionally "paginate" the archive to something reasonable. E.g. only the first (or most interesting) 30, 50 or something articles per year and, if necessary, a link to show all articles of a single year (paginated as well). This will scale even as archive.
-
This module, while having "Core" in it's name is not installed by default. You'd need to install it manually, just use the classname ProcessWireUpgrade to get it from the modules directory.
-
The resource files with the same name as the module should be loaded automatically and even be cachebusted. But there might be rare edgecases, where you'd need to include them manually because processwire might load them to late or something. I'd only do that if the need arises.
-
The processwire repository is a place to keep "processwire development". So it's git repository is not meant to comply with anything other than that usecase (the site directory is even excluded). For your own projects you can create a own repository how ever you want. While submodules sound like a great idea it's not used by many, because it's workflow is far from optimal. Also, why technically moving the index.php's logic would be possible, that strategy does not work for the .htaccess file, which is also changed every now and then dependent on the processwire version. That file does need to be in the root directory to work correctly.
-
RT @processwire: New post: Merry Christmas! Here's ProcessWire 3.0.3 and 2.7.3, comments manager upgrades, new tutorial and more! https://t…
-
Taking content management & creation to the next level
LostKobrakai replied to dragan's topic in Dev Talk
The so called matrix fieldtype was already discussed multiple times in various places all over the forum. The closest thing we currently have in processwire is probably the page table extended module, which makes different page table items far more visually distinguishable than the raw table view it has by default. The crucial difference between craft and processwire is, that craft decided to let the matrix field hold other fields – fieldception so to speak – whereas in processwire fields can only be hold by templates and therefore used in pages (without any repetition). Even repeaters, which seem like the inflexible predecessor of something like the matrix field, are internally using hidden templates and pages to store their content – opposed to the idea of storing it on the page the repeater is on. For this reasons page tables are probably the best option in terms of content management, but the UI side of it is no were near something like the matrix field. @horst Here you go: https://craftcms.com/features/matrix- 11 replies
-
- 2
-
- flexibility
- concept
-
(and 1 more)
Tagged with:
-
How to connect two different PW installations together?
LostKobrakai replied to titanium's topic in General Support
Multi instance support is planed for 3.0 but it's not ready to be tried out yet. -
Selector for Pagetable or. Filter Pagetable ?
LostKobrakai replied to Orkun's topic in General Support
You can use all the api function, which you can use on other pageArrays as well, just keep in mind that it's using the runtime selector engine, which isn't as powerful as the db selection. E.g. there's no automatic replacement for the today keyword. $today = time(); $filtered =$page->activity_create_date->find("date_from>=$today, sort=date_from"); -
@ryan How about using this http://stackoverflow.com/questions/5716362/how-can-i-get-the-value-of-mysqls-ft-min-word-len-configuration-variable-usin to retrieve the value on install and maybe a setting somewhere, where it can be readjusted ($config maybe)? It's hard to imagine this value to change often.
-
$sanitizer is a variable like $page or $pages as well. // In functions replace $page with wire('page') and $sanitizer with wire('sanitizer') $alltags = explode("|", $page->thumbnail->tags); foreach($alltags as $tag){ $sanitized = $sanitizer->pageName($tag, true); … }
-
Regarding page reference for page/product's categorization
LostKobrakai replied to adrianmak's topic in General Support
It's possible to have the inputfield render optgroups but FieldtypePage has no option to provide the necessary nesting of pages to support that. I think currently only manual setup does allow for those groupings. -
$page is a local variable in template files just like each custom ones you define yourself. These are not somehow automatically available in functions. There are already other topics about that in the forum, just search for something like "variable scope" and "functions".
-
This is probably what you're needing to create the href value: http://cheatsheet.processwire.com/sanitizer/properties-and-methods/sanitizer-pagename-value-true/
-
If it's as easy as – just use it if available – I've no problem with it. But wouldn't at least all the sanitizers need to be aware about striping those characters or not, depending on if they can be stored?
-
Change/Manipulate PageListNumChildren in Tree
LostKobrakai replied to Orkun's topic in General Support
As soon as it comes to pagination it does become difficult to know, which pages will be removed on runtime and which one aren't. That's why it's using numChildren, which just asks the mysql database. Mysql can count those pages without the performance issues that php might have. There's already a quite long github issue to the topic: https://github.com/ryancramerdesign/ProcessWire/issues/302- 1 reply
-
- tree
- ProcessPageList
-
(and 2 more)
Tagged with:
-
I'm not sure if moving the requirement for mysql from 5.0.15 to 5.5.3 is a step to be taken as easily. E.g. I'm hosting my personal websites on a webhost, which runs it's servers on CentOS6 (even still some on v5) which does come with just MySQL 5.1. I would suppose it's not the only one out there in that situation.
-
If $audience is an array of pages then you cannot get the "title"(sic) from it directly. Use the implode function to get a string with all titles. Also you should rather take the names or use some other function to sanitize titles to valid class names.
-
You shouldn't hardcode the domain part of the url (localhost) or your site will break as soon as you move the site to another location (online). And the right path surely depends on where your js files are actually stored.
-
Is there a specific reason to do so? Maybe we can help you out without the need for you to reinvent the wheel.