Jump to content

Lance O.

Members
  • Content Count

    320
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Lance O.

  1. I just came across this same issue with PW 2.5.3. When SVG images are uploaded, PW stalls and won't create the thumbnail image. When I add the dimensions to the SVG file as suggested, the thumbnail image isn't generated and won't properly display on the public site (broken image shown in both cases). :-(
  2. I just discovered that if you create child pages of a parent page, then decide to add a PageTable field that includes template of the existing child pages, those child pages won't be available to add to the PageTable field on the parent page. In other words, if you are going to use a PageTable field, it appears that you'll need to make sure you create this field before you start adding child pages.
  3. Ah, I see it now after a bit of testing. Thanks for the insight and quick response!
  4. @Macrura Thanks for your response. Your examples help me understand when to use PageTables. You mentioned that "you can add pages not through the page table, and it will pick them up and ask you if you want to add them." What are you referring to here?
  5. I was going to start a new post but will piggyback on this one since my questions are related. As Ryan has stated previously: "PageTable lets you choose where [pages] should live, whether as children of the page being edited, or as children of some other parent page you designate." Can someone elaborate on the pros and cons of storing pages as children of the page being edited vs. children of some other page? I also understand that no matter the location of the child pages, additional child pages can only be added by using the PageTable field that has been set up. Are there some cases where it is better to hide stored pages under some other page to prevent confusion (from the client) when editing? It would also be helpful to know what types of data are most appropriate for PageTables. For instance, instead of using a repeater field, would the use of PageTables be more appropriate for PDF files that need to include additional fields, such as description or category?
  6. Wow, how did I miss the addition of the field export/import capability to ProcessWire? This is fantastic and exactly what I needed! Thanks, kongondo!
  7. Adding fields via the API is much faster than adding them using the Admin. If I can create a library of custom field sets, I can save a lot of time setting up a site or adding to an existing one. Thanks for your response, kongondo. I'll check out the resources you mentioned.
  8. I would like to create sets of custom fields that can be added using the API to sites as I need them. For example, if one of my clients has an existing site developed in ProcessWire and needs a blog added, I would like to use the API to add a set of custom fields specific to a blog. As another example, I may need to add a set of custom fields for social media links. Unfortunately, I can't seem to find a resource that lists every property needed for each field type. How do I know which properties to set? Or is there a way to output fields and properties for an existing installation of ProcessWire?
  9. Include the slideshow code in the template where you want the slideshow to display.
  10. Depending on the project, I'll set up slides in one of two ways: I'll create a repeating field named "slideshow" that contains an image, a text field, and a link field. This repeating field resides in a tab on templates that use a slideshow, such as the Home page. Or, I'll create a parent template named "slideshow," then create a child template named "slide" that contains an image, a text field, and a link field. The text and link fields are optional and only need to be included if each slide contains HTML text and/or is linked. Once the slides are populated in the CMS, I'll use Cycle2's API to set the slideshow options for that particular project in my template. http://jquery.malsup.com/cycle2/api/ Here is a simplified example of the code. You'll need to set your own options for the slideshow based on your project requirements. $items = $page->slideshow_repeater; // if using repeater field // $items = $page->children("template=slide,sort=sort"); // if using pages echo "<div id='slideshow'>"; echo "<div class='cycle-slideshow'"; echo " data-cycle-fx='fade'"; echo " data-cycle-loader='wait'"; echo " data-cycle-slides='> .slide'"; echo " data-cycle-speed='500'"; echo " data-cycle-swipe='true'"; echo " data-cycle-timeout='4000'"; echo ">"; foreach ( $items as $item ) { echo "<div class='slide'>"; echo "<a href='{$item->link}'>"; echo "<img src='{$item->image->url}' alt='{$image->description}'>"; echo "</a>"; echo "</div>"; // slide } echo "</div>"; // cycle-slideshow echo "</div>"; // slideshow Here is a site I developed earlier this year that uses different implementations of the Cycle2 plugin and ProcessWire: http://prcss.in/rosendale
  11. I highly recommend jQuery Cycle 2. I've been using it and the earlier version for years and absolutely love it. And I can easily integrate slides into ProcessWire. http://jquery.malsup.com/cycle2/
  12. @soma Looks like that fix did the trick! Thank you for updating. I think I'm going to get a lot of use from this module.
  13. Oops, for some reason, the module isn't detecting my custom CSS file. My path is correct: site/templates/notes/notes.css and the file exists when I visit it in a browser. I'm using PW 2.4.0.
  14. This is a great module and a simple solution to providing contextual help for my clients. Thank you, Soma!
  15. I tried resetting the password, but the same error occurs. I'm considering downgrading to 2.3.0.
  16. Is this as easy as replacing core files with version 2.3.0 files, or is modification to the 2.4.0 database needed?
  17. Is it possible to downgrade ProcessWire from 2.4.0 to 2.3.0?
  18. @Pete Yes, the installer tells you which PHP version you need, but that's only if you are using the installer. I was exporting/importing the database from a development server to a production server. The site ran fine until I tried to log into the admin and received a "Unable to generate password hash" error.
  19. Any reason why the requirements page hasn't been updated? That's the page that I send to my clients and their hosting companies. How do I explain to my hosting company contact that I've been providing them with the wrong information and they have wasted their time this week trying to get this site running correctly? Grrrrr.
  20. The ProcessWire requirements page states that ProcessWire requires PHP version 5.2.4 or greater. http://processwire.com/about/requirements/ Yet when I just tried to install ProcessWire 2.4.0, I receive the following error: ProcessWire requires PHP version 5.3.8 or newer. You are running PHP 5.3.3-7+squeeze19" I'm installing on a host I've never used before, and I'm not sure what "squeeze19" is. Why is ProcessWire giving me this error? What are the actual PHP version requirements?
  21. Thank you Soma, adrian, and horst! This seems to work: foreach ( $results as $item ) { if ( $item->matches("template=resource-category|resource-subcategory|resource-file|resource-link") ) { foreach ( $item->parents() as $parent ) { if ( $parent->template->filenameExists() ) { $url = $parent->url; $title = $parent->title; } } } else { $url = $item->url; $title = $item->title; } echo "<a href='{$url}'>{$title}</a>"; }
  22. Is there a way to find a page's closest parent that has an uploaded template file if I don't know what that template file name is?
  23. A site I am currently developing has a need for multiple levels of container pages, named as "Category" and "Subcategory" below. Pages that include files can be added as children to both the "Category" and "Subcategory" container pages. Pages named "Page" and "Subpage" display the content of child "Category", "Subcategory", and "File" pages. The "Category", "Subcategory", and "File" pages do not use a an uploaded template, so viewing those pages in a browser will produce a 404 error. - Home -- Page 1 --- Category 1 ---- File 1 ---- File 2 ---- Subcategory 1 ---- File 3 ---- File 4 -- Page 2 --- Subpage 1 ---- Category 2 ----- File 5 ----- File 6 ----- Subcategory 2 ------ File 7 ------ File 8 My question is, when a user performs a find on the site and finds one of the "Category", "Subcategory", or "File" pages, how I do I display the found page's closest parent that uses an uploaded template? For example, in the file structure above, how can I display the "Page 1" page when a user searches for "File 1" or "File 3"? How can I display "Subpage 1" when a user searches for "File 5" or "File 7"?
×
×
  • Create New...