-
Posts
440 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Klenkes
-
It would have to be something like: $pages->find("has_parent=$page->parent, template=subitem-template, switched=1");
-
You could try another approach but it depends on how you manage shopowners in the backend. If they can register themselves it will be a little more problematic, but if an admin creates shopowners you could try: Create a page /shopowners/ (with its own template) and create pages as children for each shopowner with a title field(default) and a page reference field which points to the users page. On the page /shopowners/ you then don't query the users, but the pages unter /shopowners/ with the page reference ID. With this ID you then get the content and your url would be /shopowners/shop-owner-name/ Same goes for /shopowners/shop-owner-name/ Get the page field ID and retrieve the content for the user. Another approach would be: Just like the above with the page reference field But keep the user page data to a minimum just with username, language and password Store all the public viewable data in the pages under/shopowners/shop-owner-name/
-
Looks like it handled required fields right from the start.
-
Thanks for the pointers. I cleaned up the variables and added default values for the button. Also got rid of the generation of the second button. Is a copy anyway. I agree. This would be cool but perhaps beyond my skills as I patched stuff together from AutoSave. I will look into it...
-
Well... there it is: https://github.com/Klenkes/AjaxSave At the moment the only configurable setting is the button text. I tested with all kinds of configurations and found no problems except admin theme UiKit shows the message box twice for a second. I'm sure the module could use a "cleaning" hand from a Pro
-
Turns out it wasn't that hard after all! I "reworked" Somas AutoSave to my needs and, to my own surprise, it works fine. Have to test it though on more complex page structures and fieldtypes. After three years "living" with PW I am still amazed how easy some things are. Even for me.
-
Budget is not the problem, I love Ryans ProModules! But I never had the need for ProDrafts with all its fancy features and just for an apply button? But it would be worth it. Just to peek into it and see how it is done.
-
Ah thanks. I will take a look at it! Autosave may not be an option but maybe it can be adapted to use an ordinary button.
-
I know. But unfortunately it's just an ordinary save action and the page is reloaded with scroll to the top of the page and all fields closed again
-
The more I work on projects that have lots of fields, lets say on a produkt page, I miss an "Apply" button that saves silently in the background without reloading the page. Imagine your fields are organized in fieldsets, and for a good overview they are set collapsed. Each time you save your page you start new by scrolling down, look for your fieldset, open your fieldset, look for your field, and place the cursor again where you left off. Example: Unless there already is a feature like that and I missed it this is my feature request.
-
I absolutely understand the position you are in. In my 20 years I saw a lot of CMS, switched because they took a wrong turn in development, or were overcomplicated. With PW I finally feel at home. Let me give you some advice in the steps you should take: Install PW locally with the intermediate profile Look at the templates, especially _main.php, _func.php and what's going on in there Then take a look at Selectors. Read for a while and play with them in your template Create new fields, add them to templates and use your new knowledge with selectors! Look at imagefields, text and textarea It won't take long untill your first Aha-experience! Play with the structure of your pages and adapt your selectors(select parents, parent->parent and children) Bookmark the Cheatsheet and look at it often It won't take long - believe me. And a whole new world of possibilities will open up to you! I have been there.
-
MarkupSimpleNavigation is really nice if you show the real path of your document structure in your url. But in your case you always show the parents url, then I would go another way and do it yourself like: echo '<ul>'; foreach($pages->get('/')->children as $item){ $class = '';// for marking the parent li if($item->id == $page->id) { $class = "parent"; } echo "<li class='{$class}'><a href='{$item->url}'>{$item->title}</a>";// open toplevel li // if there are childpages if($item->children){ echo '<ul>'; foreach($item->children as $anchor){ // you would have to set the anchor targets to the name of the page // note: $item->url # $anchor->url because you need the parents url echo "<li><a href='{$item->url}#{$anchor->name}'>{$anchor->title}</a></li>"; } echo '</ul>'; } echo '</li>';// close toplevel link li } echo '</ul>';
-
PW3 - Display Site Preferences Field Content
Klenkes replied to ridgedale's topic in API & Templates
or echo $pages->get(1234)->siteChairperson;// where 1234 is the id of the settings page- 4 replies
-
- pw3
- site preferences
-
(and 1 more)
Tagged with:
-
Same on iPad in landscape, but NOT in portrait orientation!
-
When trying to modifiy a field of type Multiplier(V13) I get an error: Error: Call to a member function get() on null (line 317 of D:\Projekte\kopfleere\processwire-dev\www\wire\modules\AdminTheme\AdminThemeUikit\AdminThemeUikit.module) Line 317 states: $fieldset->collapsed = !$field->get('themeColor') && !$field->get('themeBorder') && !$field->get('themeOffset');
-
Thanks al lot!!! This is the first howto I actually understood! The only thing I noticed is, that if I change the name of a page in the default language(now not EN anymore), all other name fields are changed to the same value as well. Strange...
-
You are absolutely right! The fix works!
-
I think not. The error occurs for me on pages with no repeater on it. Or perhaps I misunderstood...
-
I second that. I cannot insert a link or edit a link in CKE on templates with FieldsetPage.
-
Rewrite Base isn't active by default in PW htaccess. # RewriteBase / While my hoster is fine with it, on some servers I have to enable it to make rewrite work.
-
Mhh... I think I ran into this problem before and solved it somehow, but can't remember how... 'item_tpl' => '<a href="{url}">{title} <span>({numChildren})</span></a>', The {numChildren} counts hidden and unpublished item as well.
-
Just in case someone else encounters the same problem: I had to migrate a whole website to PW and during tests I imported around 200 pages. Now I wanted to delete them and start the real import process. To get rid of the test pages I tried to delete them with adrians AdminActions, but got an error message and nothing was deleted: Error: Call to a member function path() on a non-object (line 261 of /xxx/site/assets/cache/FileCompiler/site/modules/Pages2Pdf/Pages2Pdf.module) I had to detach the template in question in Pages2Pdf settings. Then it worked and I was able to delete the pages. Same error with a ListerPro Action(Delete), so I asume it's a problem with Pages2Pdf... PW 3.0.62 Pages2Pdf 1.1.7
-
Just to let you know: I did a few more tests with and without "Use ACF" and it seems to work just fine! All happened on PW 3.0.62
-
#2 makes sense. A quick test shows no problems and it seems that the fields settings are respected. I will do further tests the next days.