-
Posts
138 -
Joined
-
Last visited
Posts posted by lenoir
-
-
Link to the module page is broken – is the module still working with the latest PW version?
-
Ok, I wrote the php codes from scratch and now it works. Very strange. Definitely a mistake from my part.
Thanks for suggesting Tracy Debug, I'm testing it right now ?
-
Just now, MarkE said:
When you create a repeater field, say 'fieldname', PW automatically creates a template called 'repeater_fieldname'. It looks like you are using this, not the actual field name. If you actually called your field 'repeater_agenda' then the template will be called 'repeater_repeater_agenda' (check your templates list with system templates filter turned on). I wanted to eliminate the possibility that you might be calling the template rather than the field.
Oh I didn't know this. I actually started calling all my repeaters "repeater_…" but that might not be the brightest idea in that case. But I find sometimes forget which fields are repeaters and which aren't, that's why I started doing this.
But I guess this isn't the problem, since I'm pointing to the right field.
-
4 minutes ago, MarkE said:
@lenoir I would expect the field name to be 'agenda' and for 'repeater_agenda' to be the name of the (system) template it uses.
I don't get your point, sorry. I don't see what this has to do with my issue?
-
1 minute ago, MarkE said:
Is repeater_agenda your field name? It looks more like the template name.
yes, my repeater is called "repeater_agenda" and has 2 fields, title and a datetime called "eventdate".
-
Hi,
this seemed quite straight forward, still can't get my head around it…
I have a repeater with 2 fields (title and datetime). I want to sort the repeater items in the API by the datetime field. But it doesn't work.
foreach($page->repeater_agenda->sort("eventdate") as $agenda){ }
This doesn't do anything. Am I missing something?
-
Wow. These are great inputs! I'll have to look into them more closely, since they are some new concepts to me. I only feel stupid I haven't asked the community sooner ?
-
4
-
-
Hi,
I've been using PW on so many websites to this day, can't count them. Still, I'm always looking for a better way to name my fields. A typical problem is when I need multiple textfields on one template.
I sometime contextualize them (i.e. "lead", "maintext", "detailinformation", etc.) or use "textfield_1", "textfield_2", etc., and I even tried to differentiate them by their type or max characters ("textfield_formatted", "textfield_unformatted", or "textfield_500", …)
So my question is… What solution have you found to this issue?? ?
-
13 minutes ago, Klenkes said:
I did something like you want. Add this hook to ready.php:
$wire->addHookBefore('ProcessPageSearchLive::execute', function(HookEvent $event) { $event->wire()->addHookAfter('FieldtypePageTitle::wakeupValue', function(HookEvent $event) { $page = $event->arguments(0); // specify your temlate if($page->template == 'tool') { // get the fields you like $prefix = $page->pre; $suffix = $page->suf; // add your data to the list $event->return .= " | {$prefix} {$suffix}"; } }); });
Wow, thanks! That's exactly it. ?
-
1
-
-
Thanks Zeka, using Lister is actually a good solution. I can create a bookmark with the right settings, and share it with the users.
-
1
-
-
I'm talking about ProcessPageSearch. Concrete case: the user searches a particular page in the search field top right corner. If they type the name of a tree, there's a bunch of pages that will display with that particular tree. I would need it to display a second field with the location. So they see in the result "tree, location".
I'm also using ProcessPageList (which is perfect for displaying the pages in the tree (this time I'm talking about the tree of pages in the backend ?). But this is a different need.
Lister might be an alternative solution, actually ?
-
1
-
-
Is it possible to display 2 fields in the page search?
I got a series of pages about trees with the same name (as a page title) but different locations.
I wish I could display something like {title}, {location}
Thanks.
-
On 5/20/2021 at 9:47 AM, gebeer said:
Thanks Gebeer, that was definitely a time saver. Works fine for me. Couldn't go into the trouble of swapping languages by default, not with all content already up there.
-
Thank you Bernhard!
That's exactly what I needed. I need to get my head around hooks, hooks are cool. ?
-
Hi,
I wonder if there's a way to display an image in the backend, to help fill out some fields. In this particular case, I want do display a map of buildings with all entries numbered, so the client can look up the number in the image and select the right entry from a dropdown menu.
Thank you!
-
Hi, did you find a solution to this problem? I ran into the same question.
-
Is it possible to let people edit a page without having to have a user-role?
My case is the following:
Visitors fill in a form (Formbuilder) which is saved to pages. They get a confirmation email which could contain a unique editing link. In case they need to update some information, they can click on this link, edit the fields and save.
Am I totally off? Is there a better practice?
-
52 minutes ago, Robin S said:
It's working as expected for me. You're not including the quote marks around the value by any chance are you?
If -10:+10 is actually the value you want you can leave the setting empty because that is the default.
Actually… I was. Doh. Can't believe I oversaw that. ?
Thanks a lot
-
1
-
-
It behaves correctly if I leave the field "range" empty… But as soon as I enter some value such as "-30:+20" (as in the example), it starts counting at the current year…
-
Hi,
I've setup a date field with a date picker. I set it with a range of "-10:+10" for the years, but for some obscure reason (to me), instead of showing years from 2009 to 2029, it shows the coming 20 years (2019 - 2039).
Am I missing a preference somewhere?
-
On 11/23/2018 at 6:58 PM, zoeck said:
Did you checked the AdminThemeUIKit?
Itˋs Not 4 years old... its the newest theme ?
Of course, that's the one I'm using currently. Nice functionalities but limited in terms of design. And again, it feels old… (i know i know, it's not. But still…) ?
-
1
-
-
I'd like to add my voice to this topic. I was just browsing through the modules under "admin themes", sorted them by date and oh… the latest one is 4 years old… And almost all of them stopped with version 2.
As much as I like this CMS, I'm having more and more of a hard time convincing clients to use it, and I think it has a lot to do with the looks. It feels old and somehow odd…
i just came across the module "admin theme boss" by @Noel Boss and what a relief! Finally something I can present to my clients without shaking. ?
I'm really hoping for improvements in this field, since I'm a true believer in the love at first sight, or at least how important first impressions are.
-
1
-
-
It's an old post but still a hot topic…
I create a lot of websites for clients in german, sometimes in french. I often end up with a mix of languages either in the fields or templates names… Anybody working with multilanguage sites with a good practice suggestion?
-
Hi,
On GitHub it's posted as solved, although I still get that problem with integer fields on Form Builder.
Anybody still having that problem?
Daily export of pages and their subpages in a JSON
in General Support
Posted
Hi,
I need to export a JSON once a day automatically. It should contain a whole set of pages and their direct subpages:
Agenda
-> Play 1 (text, images)
-> Play 1 date 1 (diverse fields, datetime)
-> Play 1 date 2
-> Play 2
-> Play 2 date 1
…
I'm not sure where to do this and where to save the JSON file. I'm thinking of a hook in ready.php but I haven't done this before, so I'm a bit cautious.
Thank you for your help!