Recently Browsing 0 members
No registered users viewing this page.
Hello fellow Process wire Developers!
Today i have encountered an issue using the repeater where I can't find out how to solve it therefore i am asking for help.
To be specific, I am trying to get the "file" field working properly in the repeater but i couldn't find a way on how to assign a property of a field that is being used by the repeater.
download_pdf is the name of the field that i want to access properties from.
What i wished i could do was something like $download->download_pdf.size or $download->download_pdf->name, something like that but obviously these didn't work
Hope there is a solution and thanks in advance!
I got a new idea which come in handy when creating ProcessWire pages with enclosed subsections. Currently within the template family settings there is a setting "Can this template be used for new pages?" with the options "Yes", "No" and "One". My proposal is to add a fourth option that is "Single Child". This would allow the template to be created only once within another page (meaning that there wouldn't be any siblings with the same template).
To give you an example look at this page structure for a multi-site webpage:
Newsroom root Newsroom for Country 1 News articles Article 1 Article 2 ... Tags Search 404 Newsroom for Country 2 News articles Tags Search 404 Newsroom for Country 3 ... The root template will automatically redirect to the country newsroom page according to the browser's locale settings. Within each country newsroom there should obviously only be one "Tags", "Search" and "404" template. The option mentioned above would enable me to do this.
A work-around solution for my specific use-case would be to select the option "No" and automatically create the Country Newsroom's children via a hook that triggers when a new country newsroom page has been created. But I think that this fourth option could come in handy for other use-cases as well.
What do you think?
I have a "strange" issue with my dev set up, that I just noticed today. I set up an image field named "dev_gallery" and checked the "use tags" option when setting it up. I went to add a couple image to the field, and noticed that the tags option is not displaying at all for the image. Currently, the description field is the only current field on image edit. Have I missed a basic setting to enable this?
I am currently using PW 3.0.62 as well.
Another dumb question:
Is there a field type for a text-based array?
In my case I need to store an array of RSS feeds for SimplePie. Storing that list of links in a textarea - text formatted to look like an array - doesn't work with the script. It works with one link.
The images field is an array. I assumed there would be an equivalent for URLs or text in general.
Or is there another approach for these cases?
I guess using the optional (module) Repeater field type is the best solution in this case? I have now a working solution based on that. Still curious about other ideas.