Jump to content

Search the Community

Showing results for tags 'page field'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 15 results

  1. I am trying to implement a Repeater Matrix which contains a Page field (there are four fields, an image field, one text field and two page fields). The example given in the readme.txt is self-explanatory. However, this seems not to work with a page field. Say my page field is called "attached_ceramic_skus": <?php foreach($page->test_matrix as $item) { echo " <h3>$item->headline</h3> <=works <img... $item->image->url </> <= works foreach ($item->attached_ceramic_skus as $skus)... <= throws an error "; } } } When I debug this line, I see my image and text fields in the $item array, but not the page fields. But these fields are there and working when I enter data. I have understood how they are kept in the database. What is the method/hook to read this type of field?
  2. (apologies if this looks too similar to previous topic I created, seems more logical as a new topic) I'm curious if anyone here is implementing something along the lines of Drupal's block / Joomla's custom (editable) module functionality? In other words, areas that are editable in the backend, that can be placed on multiple pages without needing to re-enter the content on each page it is used. I tried to do this using a page as a block, and then field type Page (to get a page within a page), but this led to issues with rendering, and more important this creates an object $page->fieldtypePage which is exceptionally large, so I would prefer to avoid that route. My guess is those that do it, do it outside of PW with PHP. But the 'blocks' being editable and creatable by a site editor is important so I need to explore this or find a different solution (or tell the client no-can-do).
  3. Hello everyone! I recently downloaded ProcessWire and after playing around with it I've found its flexibility and ease of use to be really promising. I'm working on a site to publicize upcoming live music events and archive past events at our venue. Each event has the usual start time/end time/price/etc fields and can be associated with any number of bands (usually just one or two). Each band has name/website/description (short bio)/image fields. At the moment I have a page field on my event template allowing each event to be tagged with the required bands, either by choosing existing band pages (for bands which have played at our venue before) or by creating a new band page. I can then reference each band's name/website/description/image in the event template php. There are two key ways users will discover events on the public-facing site: 1) Through the events index page, listing events which can be filtered using dates and keywords 2) Through the band index page, listing bands whose pages will list past/upcoming events where they have performed. However, since: a) many bands have gone through minor lineup changes since they started playing at our venue, b) many bands have released (and want to promote) new material since they started playing at our venue, each band's description and image fields might (but not always) need to vary between events. I would like past event pages to show the band's description/image that was relevant when the event occurred, not the most recent revision. On adding band pages to new events pages, I would like the default description/image to be the most recent version for the band, with the option to replace this with a new description/image if required. It would be unnecessary to provide a new description/image for each band at each event if there were no lineup changes or releases of new material since they last performed. My first thought was to have a repeater field for description/image/start time/end time on the band template, where the start and end times help my php template decide which description and image to pair with a particular event. However, the band page field on the events template will not allow me to edit the referenced band page's attributes; it only lets me select band pages and reorder them. If I wanted to update the band description (while preserving the history of previous revisions) I would therefore have to find that band's page elsewhere in the admin then add a repeater row and enter the new description there, keeping the image field blank for that row if the image doesn't need updating. This would require the start time (of the new row) and end time (of the previous row) to be input manually... I'm convinced there must be a simpler way to maintain the links between events and band info. My current structure is: Home -- Events Index ---- Event 1 ---- Event 2 ---- Event 3 -- Bands Index ---- Band 1 ---- Band 2 ---- Band 3 Apologies if I've misused any terminology Could anyone advise on sensible strategies for achieving this using Core ProcessWire or modules? Thanks!
  4. Hey, I'm building a website with following page hierarchy home/ /blog (template: listing) /tags (template: tags) tag1 (template: tag) tag2 tag3 post1 (template: post) post2 post3 /development (template: listing) /tags (template: tags) tag1 (template: tag) tag2 post1 (template: post) post2 Ok, so I created a Page field to reference tag pages for categorization of posts in different listings. I set up the field to use InputfieldPageAutocomplete module for quickly referencing and creating any number of tags within a post. However, during the setup, Processwire allows me to pick only one parent. I want to change this behaviour such that when searching for a tag, it should only search under its own listing. Specifically, posts under /development should only be able to reference tags under /development/tags and those under /blog should reference tags under /blog/tags etc. Also, when I create a new tag, it should create under its own tags page. I don't want to use a tags page under the homepage, because I want the URL structure to be /blog/tags/journal or /dev/tags/processwire etc, not /tags/processwire. I know I can use input()->urlSegments to achieve the url structure I want, and I did it like that in the past, but it felt too hacky to change the paths for pages from their own path in page tree. I tried hooking into InputfieldPage:processInputAddPages method to make the field accept the correct tags page, but I couldnt make it work. How can I achieve this?
  5. Hello, in a 2.6.22rc1 install I have a page field "workshops" that selects pages via selector "template=workshop,sort=-dat_start,dat_start>=today)". The field is in a template "anmeldungen". When I edit a page with template "anmeldungen". I can choose pages from the page field "workshops". But when I want to save that page, I get an error Page 2188 is not valid for workshop (Page 2188 does not match findPagesSelector: template=workshop,sort=-dat_start,dat_start>=today) But the workshop I am trying to save to the page field is definitely in the date range >=today. Otherwise it wouldn't be listed in the page field select dropdown. The same error is thrown when I change my selector to "template=workshop,sort=-dat_start,dat_start>=2015-11-04". Also saving pages through the API to that field doesn't work. Only if I omit the dat_start>= selector, I can save pages to the page field.
  6. Hi folks, I have some tags setup, using the Page field options, which is really flexible and works great. However, I am curious to know if it's possible to view multiple tags at any one time? Is this possible? For example, I know to create a tag page (for example, www.domain.com/tags/events), you do the following: <?php $tags = $pages->find('parent=/projects/, tags=' . $page . ', sort=sort'); ?> Is it possible for a query to exist so you can view multiple tags? www.domain.com/tags/events&films&outdoor Any thoughts? Good, bad? Cheers! R
  7. Since upgrading from 2.6.1 dev to 2.6.13 I can't create new pages anymore from a page field. Details Single Page or empty page, input PageAutocomplete and advanced *= and 'Allow new pages' checked. I can type and see the list of pages appear, but when I type in a new name it just disappears when hitting return of clicking outside the field. It worked fine before upgrading.
  8. pepita


    Hello everybody I like Processwire very much but I’m a newbie so I have a lot of questions ;-) I hope you understand my “English”. Sorry about that. I’ve installed the indexer. And now I have some troubles with the german umlaut (ä ö ü). If I search a word with an umlaut there are no results because these letters are not in the database. Should I first replace the umlauts in the search query through whitespace or is there a better way? My second problem: I would like that the indexer also search in the content from the page field and not only in the title. So I have a page “club” that has a page field to the page “members”. I don’t want to add every member separate in the page field because I use the members on different pages. So if there is a change I have only make on one site the update. Sorry, it’s for me a bit difficult to explain. Thanks for your help.
  9. I've a blog setup which contains tags and categories related to posts. Tags and categories are both Page fields with option to add new page(s) from their fields. If I create a new post I will usually create some new tags and cats and then save the post as unpublished while it goes to review. Unfortunately, although my post is unpublished, my tags and cat pages go live on the main blog immediately. So even though my post isn't published, we have a selection of tags and cats which users can click on. I guess my request is for some kind of in-built dependency engine here that would realise my main post isn't unpublished and therefore not publish the dependencies (cats and tag pages) related exclusively or created solely for this post.
  10. I have been transitioning to Page Table from Repeaters for quite some time. I never had a problem with this transition. A few weeks ago, I finally figured out how to display a Page Table on the front end of my websites. Everything worked great. I believe after upgrading to PW 2.6.2 (not quite sure) when I did the next Page Table I could not get my Page Fields to display any more. I normally have an "Updates" Page Table that is made up of 3 parts (Date Field, TextArea Field and a Page Field). Today I created a new installation that had minimal modules and went about structuring my site. When I got to the "Updates" Page Table, it still would not display the "Contacts" title information. The field is setup as indicated: My Contact fields allow for more than 1 person to be listed in the entry. The following is a screenshot of what I have been getting for over 3 weeks. Next I added the "Contacts" Page Field directly to the template and changed the _main.php template file to display the field. $cshcon = $page->crms_show_contact->title; echo $cshcon; I still could not get the Title to display on the Page Field. I finally ended up changing the setting for the field as follows: Once I did that, I could get the title to display as it should Either one of the singular settings worked. It worked on the singular Page Field, as well as on the Page Table. As soon as I changed the field setting back to Multiple Pages, it disappeared again. What caused me the most pain was that whenever I would let the Page Table display the field without the title syntax it would display with the correct Page ID of the particular Page Field. Github issue opened which references this post UPDATE: I was remiss to not include the foreach information: Thanks, tpr for bringing it to my attention. It's been a long day already. $csu = $pages->find("template=crms-updates, crms_status_updates=$page, sort=-crms_start_date"); if ($csu) foreach($page->crms_status_updates as $csu) { echo "<strong>{$csu->crms_start_date}</strong> |"; echo " {$csu->crms_comments} |"; echo " {$csu->crms_show_contact->title}"; echo nl2br("<br />"); }
  11. Hello Everyone, I am creating a database for vehicle audio components and am having issues displaying a page array of filed Page type in the "List of fields to display in the Admin Page List " field of the template. For a particular car model, I need the user to be able to select multiple vehicle body types (ie. sedan, wagon, etc) for each vehicle model - I have created a pages for each body type (via a unique template) which the user can select via a multi select field of Page type (via Template of selectable pages). I need these body types to be displayed in the admin page list, but it doesn't seem to be able to display multi page arrays of field Page type? So my questions are. a) is this possible and if so b) what is the correct syntax to achieve this? Thanks. Cheers, Ivo
  12. Hi there, Quick question: I want to have a page field that displays only the children of the page where it's used. I can't figure out how to do this (although i'm afraid it should be quite easy)… thanks!
  13. Hey guys, I was just wondering if there was any scope for combining a Page field with a URL field. The circumstances are that I have certain blocks in a sidebar and the user can choose to link them either to an internal page or to an external url. I'm pretty sure that this is feasible from within TinyMCE but not sure how to approach it from normal page fields. The user could copy/paste in an internal link but I was wondering if there was any possibility of a future field where a user can choose either a page or a URL?
  14. Hey there, I have a page field in the form of radio buttons, where the user can select the importance of the article: Very important, important, normal. I would like to make the default value "normal", but can't think of any way of doing it. Any help? Thanks
  15. In a template, I'm drawing a 4x3 table that I want to display images from other pages selected from page fields inside a repeater on this page. Their position relative to each other is important, and most of the space in the table will usually be intentionally empty, which is why I'm doing it in this rather strange way: In the admin, the referenced page's image's position in the table is chosen from page selects with columns and rows defined in /global/matrix/rows/ and /global/matrix/cols/. In the template, we get the images by iterating through the table and seeing if any of the "ingredient" items on this page match the the coordinates of the current table cell. If what I've described here sounds confusing, it's confusing me, too. Here's my loop: foreach ($pages->get("/global/matrix/rows/")->children as $row) { echo '<tr>'; foreach ($pages->get("/global/matrix/cols/")->children as $col) { $tdobject = $page->ingredients->find("m_row=$row, m_col=$col")->first()->ingredient; echo '<td><img src="'. $tdobject->icon->size(40, 40)->url . '"/></td>'; // line that throws the error } echo '</tr>'; } This gets me: Error Call to a member function size() on a non-object However, changing that line to this works: echo '<td><img src="'. $tdobject->icon->url . '"/></td>'; So I can pull a URL from the image object on the referenced page, but I can't call size() on it. What am I missing?
  • Create New...