Jump to content

Search the Community

Showing results for tags 'Repeater'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 168 results

  1. For a school project I want to list all teachers on a page with their names, subjects and email addresses. I created 3 inputs, put them in a repeaterfield and created approx. 50 entries with teachers.(but only 5 email addresses) Frontend is rocketlike fast but in the backend the page takes more than 10 seconds to load AND save. I know, repeaterfields are not meant to hold large amount of content, but 50 entries? Not that much. The page in Admin -> Repeaters says under: Process "0" Is that correct? Or is that behavior normal for a repeater field? PW 2.7.0 Repeater 1.0.2
  2. Hello, I'm migrated a few hundred users from an old system to PW via API. I created users, they can log in etc but only one thing is not working. Users have repeater fields. After I create users I also create those repeaters but I cannot get their value from front-end of the website. But if I go to users editing page from admin I see the values in place correctly. And when I save the user from editing page (without changing anything just saving), it starts to work normally. What am I missing here, what should I do to achieve this by API? Thanks
  3. Hi I read tons of posts/tutorials about categories and variations on the same subject. However, I think there is something I don't understand or just use a wrong design. Does someone could kindly explain where is my problem? Directory (basic-page template) -- Category (links template) --- Link 1 (repeater) I have no problem to output the content of the repeater on his own page of category. However, my problem is to list everything on the directory page. I suppose I can do a $page->find("template=links") but it make no sense to add that on a general basic-page template. Or do I should have a specific template for the parent page? Or some kind of function I can reuse? (I have the exact same problem for my gallery page with a category and their children) Thanks. Mel Links template $content .= $page->render('links'); /Fields/links function renderLinks($page) { foreach($page->links as $link) { echo "<h2><a href='{$link->http_link}'>{$link->title}</a></h2>"; echo "<p>{$link->summary}</p>"; echo "<p><a href='{$link->one_image->url}'><img src='{$link->one_image->url}' alt='{$link->one_image->description}' ></a></p>"; } } $content = renderLinks($page);
  4. Hi, for a site about adoption of dogs (laboratory beagles) we need a solution for display and filter records (700). Every record has identical fields (name of the dog, age, gender, pictures and name, address, phone number of the person who wants a dog and so on). It should be very easy for the admin of the site to make new entries/change entries and filter for specific entries in the backend. In the fronted there should be a possibility to filter entries too (maybe someone is searching a dog with a specific age). How can i do that? Use Repeater Fields to create the records? There are about 60 entries (textfields, radio buttons, select fields ...) in every record. Is this "to much" or are Repeater Fields able to handle this? For the filter part i'm sure that the Lister Pro ist the right solution, right? Mario
  5. Hi everyone, I'm new to processwire and have just started playing around with it for the past week. At the moment, I'm trying to use repeater fields and am having difficulty getting them to output to my page. Instead, what bizarrely seems to be happening is that half of the foreach loop declaration seems to be appearing as plain text on my page and is commented out when I check inspect element. I'm not sure if my syntax is wrong or this is an entirely different problem. Any help would be hugely appreciated! Here's my code: <?php $portfolio=$pages->get("name=portfolio");?> <? foreach ($portfolio->portfoliopreviews as $portfoliopreview): ?> <a href="#"> <div class="port"> <img class="pic" src="<?=$portfoliopreview->portimg->url;?>"/> <div class="portbgrdtext"> <h5><?=$portfoliopreview->portgenre;?></h5> <p><?=$portfoliopreview->porttext;?></p> <button class="portbtn">Read More</button> </div> </div> </a> <? endforeach; ?> And in the attached images you can see what's happening on the page and within inspect element. You can see that the div is being created, albeit without any fields populating inside of it. You can also see that loop is being commented out within inspect element. Cheers!
  6. In reference to http://processwire.com/api/fieldtypes/repeaters/ is it possible to say 'where all repeater items' rather than 'where at least one repeater item' inside your selector? What I have is a repeater with a checkbox. I want to find pages where all repeater items on the page are checked or unchecked. If I do this: $pages->find("my_repeater.my_checkbox>1"); I get pages where at least one repeater item has the checkbox ticked, but what I want is pages where the checkbox is ticked in all of the repeaters.
  7. Hi folks, I have a repeater set up on a 'fabrics' page. When you add a fabric, you then add an image and a colour (per row on a repeater); the colour field is a pageField which lists out all the colours from the Colours section. See screenshot for an example. Across the site, where 'related fabrics' come into play, the client will choose, via a pageField, all the relevant fabrics and it'll take the first row of the repeater (image and assigning colour) and display it. See second screenshot as an example. This is all good and works BUT there is one section of the site 'In-Situ' where the client would have to choose a specific colour from a fabric (and not just the fabric). As the image/colour combos are set up as a repeater (which are added as pages in the CMS under 'Admin > Repeaters' (which is amazing) I can simply tell a pageField, using a custom selector, to show each 'row' from across the site (which would return all the images and colour options for each fabric). template=repeater_collections_detail_images, include=hidden, sort=name This works a treat. I can then use the custom page label format which would return the parent title of the page it's on and then the title of the colour chosen. {parent.title} – {collections_detail_image_colour.title} I have one issue, however. The parent.title isn't user-friendly and is rather the canonical title of the page, not the actual title of the page, so looks more like a name than a title. See the third and fourth screenshot as an example. The only thing I can think of is that these repeaters and their rows are on these specific fabric pages, right? So is there a way for the custom page label format to return the title of THAT page and not the repeater page? See my final screenshot for what I mean. The repeater has a path, for example, .../for-page-1080/ and the page 1080 that it is referring to is the page of the title I am trying to get. Any ideas? I realise this is a little long-winded but any help or advice would be appreciated.
  8. Hi guys Is there a way to call a Repeater content and specify that Repeater item 1 should use mini template "odd" repeater item 2 should use mini template "even". I think that's half my battle. Basically, I have a weird little grid of cubes as follows I have it all working as basic CSS and HTML but I now need to make it client edit friendly. I have some complexity in that: 1. Each text panel has a unique color (ideally specified by CSS) 2. On each row, the photo and text are on different sides I was wondering if a repeater would work. I can certainly use that to allow client to add raw text and image. I then realised that allowing the client to add content isn't the challenge as much as outputting it correctly on the front end. I'm having trouble understanding how I can tell the page to Make Row 1 use this blue background. Put the image on the right. Make Row 2 use this pink background. Put the image on the left. Make Row 3 use this other blue background. Put the image on the right. I could always resort to plain non-repeater fields but I'd then have 6 fields etc
  9. Hey all, I have an image and text field in a repeater. When I iterate over repeater using foreach loop, image is not returned (null is returned instead), but text field is. Some (I guess) useful information: I am using ProcessWire 3.0.17 Image field supports svg format (jpg in not returned either) Image filed is limited to one file and is without description Image field's format is set as 'single or null', but array with field->first or field->eq(0) also doesn't work Images are uploaded to server I used the same approach foreach($page->repeater as $item) $item->image->url a dozen time before in older versions, so I wonder if something maybe changed in v3? I ran out of ideas what could be wrong and what I need to change, so I hope you'll be able to help me Thanks! Žiga PS. I also noticed that I cannot add description to .svg images. Is there a special reason for this?
  10. I have a small issue with my $pages->find query. My pages have a repeater field that is a checkbox. I'm trying to sort the results so that I get pages where at least one of the repeaters has the checkbox field checked. What I'm doing currently is: $my_pages = $pages->find("sort=-my_repeater.my_checkbox_field"); So I'm sorting high to low, i.e. checked before not checked. The issue is that it only appears to take into account the checked status of the first repeater item. If the second, third etc is checked, the page is not appearing at the top of the results. I'm guessing there must be an easy way to check all items in the repeater?
  11. Hi, for a download area i wanna use a repeater field with a text field (description of that download) and a file field (the download file). The repeater field is "downloads" and it contains the fields "body_part_1" and "download_files". When i use this: <div class="uk-grid"> <?php foreach($page->downloads as $download): ?> <div class="uk-width-4-6"> <?php echo $download->body_part_1; ?> </div> <div class="uk-width-2-6"> <?php $file = $download->download_files; if($file) echo "<a class='download-links' href='$file->url'>$file->description</a>"; ?> </div> <?php endforeach; ?> </div> the output is this: <div class="uk-width-2-6"> <a class='download-links' href='/site/assets/files/1083/'></a> </div> The text (body_part_1) is ok, but no description inside the link and the path lacks the filename. Of course it's my fault, but what i'm doing wrong?
  12. Hey all. I have a repeater with single textfield items. Everything is working fine till I reach 51 items. When I want to add the 52th, I get a 500 Internal Server Error and the page is not editable anymore...I have to delete the page and start from scatch. Can anyone think of a reason for that? And of course a solution? Thanks a lot!! [EDIT] I am running: - ProcessWire 2.7.2 - FieldtypeRepeater 1.0.2 - MySql Server Version: 5.5.47-0 - PHP Version 5.6.21
  13. Afternoon, I have a page setup with a repeater which has 40 or so items in. Each repeater item has around 6 fields. This is becoming a little unusable so I'd like to convert them to child pages of the current parent. Is there a way to do this (import/export maybe?) Many thanks Pete
  14. I'm creating my first site with PW. I've seen several posts on this and I think I'm doing it the same way, but I can't make this work. I have a repeater set up on a news page. The items display on that page correctly. I also want some of the items from the news repeater to display on the home page. (I'm going to use a checkbox in the repeater to determine which ones, but I can't get any of them to appear right now). The $pages->get() appears to be returning the correct page, but nothing is displayed. I've used the page name and ID in the get(). Code on the news page works correctly: <?php foreach($page->news_items as $news) { echo "<div class='news'>"; echo "<h2>{$news->heading}</h2>"; echo "{$news->body}"; echo "</div> <!-- news -->"; } ?> Code on the home page that DOES NOT work: This code never gets into the foreach loop. The echo "news" line is never printed. No idea what I am missing. <?php $newspage = $pages->get("/union-county-fair-news/"); echo $newspage." page"; foreach($newspage->$news_items as $news) { echo "news".$news; if ($news->show_home_page == 1) { echo "checked"; echo "<div class='news'>"; echo "<h2>{$news->heading}</h2>"; echo "{$news->body}"; echo "</div> <!-- news -->"; } } ?>
  15. Hi, another stupid question from a PW newbie. I'm working on a page which displays team members with some information (name, phone number, ...). For the person who edits these infos later i wanna make it as simple as possible to change the entries. I was trying to use the repeater field for some sort of grouping the infos for the several team members in the backend. This works like expected. But how to display the entries in the frontend? There i need the separate fields (name, number ...) to be able to do a formatting. Is there another way of grouping the fields in the backend, but access the individual fields for displaying in the frontend? Mario
  16. My site has three language, default, chs, eng. Default language is cht (traditional chinese) I have an order template (no output template). Structure look like An order will be created after a successful paypal transaction has been made. When I'm on default language, the order creation is working properly. However, if I switched to chs or eng The order number field i.e. title field cannot be inserted. I just saw an empty title field. All other fields are populated values properly, except the order number Here is my page creation code $p = new Page(); $orderByUser = $user; $p->template = "order"; $counter_name = $order_number_prefix . date('Y'); $number = $this->modules->get('DatabaseCounters')->next($counter_name, 1, 5000); $ordernumber = $counter_name . '-' . sprintf("%06u", $number); $p->title = $ordernumber; $p->member = $orderByUser; $p->payment_method = $session->get("payment_method"); $p->order_time = $session->get("order_time"); $p->paypal_transaction_id = $session->get("paypal_transaction_id"); foreach($session->get("cart_item") as $cart_item) { // create order items $item = $p->order_items->getNew(); $item->product_id = $cart_item['id']; $item->product_name = $cart_item['name']; $item->product_price = $cart_item['price']; $item->product_quantity = $cart_item['quantity']; $item->save(); $p->order_items->add($item); $transaction_amount += ($cart_item['price'] * $cart_item['quantity']); } $p->transaction_amount = $transaction_amount; $p->of(false); $p->save();
  17. I used a repeater field on my site to handle arrest reports. (It's much easier for the user than say adding a new entry for each person arrested as you would a new page). Basically, my client creates a new entry with the arrest report section then starts adding repeater "records" and data which include: name dob offense mugshot ... repeat the above for each offender This is a small county newspaper and we rarely have over 100 arrests listed per report. I noticed when about 60 repeaters are added after that I get a server timeout when trying to edit the page. I bumped up max_execution_time to 90 seconds and I get a 500 error. When I set max_execution_time to 60 seconds it loads -- but that is really pushing it. It was my belief that the Repeater field type could handle lots of repeaters, with the exception of getting into say a thousand or more, but 60-70? This may take care of it for this project, but, I'm thinking about future projects. I noticed that ProFields has a Table field type and watched the video, however, I didn't see any option of adding an image field in there. Is that possible? This would allow for fast entry of data with the addition of an image for each record. Any other suggestions are appreciated. thanks.
  18. I wish to show various bits of information on a File repeater (extension, filesize etc). The filename shows correctly, but the links to the files open the admin area, the file extension is empty and the filesize too. function renderDocumentLibrary($page) { $out = ""; if ($page->document_download->count()) { print_R($page); $out .= "<div class='row downloads'>"; foreach($page->document_download as $download) { $out .= "<div class='col-xs-12 col-sm-6'>"; $out .= "<div class='download clearfix'>"; $out .= "<a href='{$download->url}'><img src='{$download->ext}' alt='Download {$download->document_name}' class='download-icon' /></a>"; $out .= "<div class='download-content'>"; $out .= "<span class='download-date'>" . date('d.m.y', $download->modified) . "</span><br />"; $out .= "<h2 class='h4'>{$download->document_name}</h2>"; $out .= "<a href='{$download->url}' class='download-link'>Download {$download->ext} ({$download->filesizeStr})</a></div>"; $out .= "</div></div>"; } $out .= "</div>"; } return $out; } Can I access those attributes in this way?
  19. Hi there, I have a little problem with a repeater that I'm using for events, containing three fields: start_date, end_date, description On the homepage, I want to display the upcoming two events. So I have to filter out past events, sort by the dagte and set a limit for the output I thought I could do it with something like the following code, but there's no output: $nextevents = $pages->get("template=events")->events->find("end_date>today, sort=end_date, limit=2"); foreach($events as $event) : ?> <li class="future-event"><?= $event->end_date ?><span><?= $event->description ?></span></li> <?php endforeach ?> the template of the repeater is called "events" and the repeater field's name is also "events" I guess it can't be that difficult, but after trying different things and looking through the docs, I still have no idea how to solve it. Would be great if someone can help! Thanks
  20. Hi, following scenario: I have a Single-Page implemented with ProcessWire (So i got only one page in the Backend) The customer wants me to implement a functionality which recognize the current saved item of the repeater and publish it to his facebook-page. But this is my problem. I don't see any possibility to "catch" this last-saved entry of the repeater programmatically. This here is my repeater The name of the repeater is "referencesList" (the field-name) Do i have to programm a module for this plan? Thank you very much in advance for your answer
  21. Ok, so I have been scratching my head on this one for the last hour. I had three repeaters that I needed to delete from the list to create some new ones (I removed them from the template via actions). However when I go to delete the repeater, it is saying it is still use by 3 other pages. I am at a loss of what to do.
  22. I'm using a repeater field for holding stock levels of different items and when all the rows' quantity columns equal 0, I want to set another stock checkbox field to off. I'm doing this in the template that displays the product: foreach($page->inventory as $stock) : $stock_total += $stock->qty; if($stock_total==0) : $page->of(false); $page->stock = false; $page->save(); endif; endforeach; but it's setting $page->stock to off whenever the page is refreshed regardless of whether $stock_total = 0 or not. Why is that?
  23. Hi folks, I have a repeater field set up and there's a few issues with the usability that I was curious to know if there were any options to improve this? Is it possible to make a repeater element add to the top, rather than the bottom? I know you can drag/drop but if it's a long repeater then it can get clumsy. If the possible isn't an option, is it possible to have the repeater rows collapsed by default? Any thoughts?
  24. Hello, I just thought I'd mention this, I'll most likely post on GitHub. I just want to make sure I'm not being a total newbie. Introduction I'm creating case studies that will have a slider. For this I've opted for repeater over PageFields as it will only have the fields, text and image. I understand that PageFields are the way to go over repeaters, however I felt creating new pages and using the iFrame to edit might be a little too much for this particular project. (Correct me if I'm wrong, I'm new to ProcessWire) The Problem I have created a tab called Slider, in this there is a repeater that has a few fields. However, when I add content to this field and save, the content does not save. How to reproduce Create a tab Add a repeater to the tab Add content to the repeater and save The content should disappear. If it doesn't then I must be doing something wrong, somewhere. Thanks, Tom
  25. Hello, I am developing a module that lets a user create, modify and save a "TV Grid" (the schedule for a TV channel). Here you can view some images that illustrate the concept: https://www.google.com/search?q=tv+grid&tbm=isch Of course, those are just examples and do not represent my specific implementation, but with that I hope you get the idea. The module installs a template for a "channel" (among other things). The "channel" has a "Repeater" field, where I store the complete grid for that channel. The repeater (grid) contains repeater items (grid items) that represent a scheduled show, e.g. ["Friends", Monday, 1st show of the day, lasts 60 minutes]. The repeater field is hidden from the user if he/she tries to edit the channel page via the admin's page edition interface. The intended way to edit this TV grid is by using the module's page that I've developed, which provides a custom interface for creating, manipulating and saving the grid. This of course means that I'm doing many things programmatically. The problem is that the repeater items I'm creating via code using the user's input just WON'T save. I've made all the code changes I could think of, trying different stuff, without positive results. Looking at the database, I notice the following when I run my code: - The corresponding row for the repeater field in its table is updated/saved. - However, no new rows are created for the repeater item fields (e.g. TV Show, duration, day, etc.). Would you please help me out here? I'm becoming insane ... I've included some code below. /* * More code before this, ommited because it isn't relevant. */ // Get the channel object (a Page). $channel = wire("pages")->get($channelId); if(!$channel->id) { $this->error("Channel does not exist. Grid can't be processed."); return ""; } // We need to clean this channel's grid before working with it. // "channel" is the Page // "tvChannelGrid" is the Repeater $channel->tvChannelGrid->removeAll(); $channel->tvChannelGrid->save(); $channel->save(); // Save the page.*/ // Add the grid items received from the module's form to the channel's grid. foreach($tvGridData as $i => $item) { // "tvGridData" is an associative array with data received from a form. $showId = intval($item["tv_show_id"]); $duration = intval($item["duration"]); $day = intval($item["col"]); $row = intval($item["row"]); $gridItem = $channel->tvChannelGrid->getNew(); // this must be done according to the documentation. $gridItem->save(); // Save the newly built item. // Assign values to repeater fields. $gridItem->tvChannelGridShow = wire("pages")->get($showId); // FieldtypePage $gridItem->tvChannelGridShowDuration = $duration; // FieldtypeInteger $gridItem->tvChannelGridShowDay = $day; // FieldtypeInteger $gridItem->tvChannelGridShowRow = $row; // FieldtypeInteger $gridItem->save(); // Save the newly built item. $channel->tvChannelGrid->add($gridItem); // Add the new item to the repeater. } $channel->tvChannelGrid->save(); // Save the repeater. $channel->save(); // Save the page.
×
×
  • Create New...