Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/29/2013 in all areas

  1. You've been using MODX but now you've found ProcessWire. It’s totally amazed you and you can’t wait to get started. But…you are wondering where everything is. If this is you, read on… This guide is primarily aimed at those who are coming in from MODX and wish to know how to accomplish “MODX things” the “ProcessWire (PW) way”. This is not meant to be a full blown PW tutorial. It will focus on some key MODX concepts/tasks and how to accomplish those in PW. It will cover, whenever possible, both versions of MODX - Evolution and Revolution. The guide assumes that you’ve at least logged into a PW site and/or viewed a demo. The Table of Contents mostly reflects MODX terminology. Table of Contents 1. Manager 2. File System 3. Resources 4. Templates 5. Template Variables (TVs) 6. Template Files 7. Snippets 8. Modules 9. Plugins 10. Chunks 11. Miscellaneous 12. Examples - the PW way… a. Template Variables b. Snippets c. Modules d. Plugins e. Chunks 1. Manager In PW, the “manager” is referred to as the “Admin”. The default location of the Admin is www.yoursite.com/processwire. As of PW 2.3, you can rename the Admin to anything you wish during install. Just be careful to remember the name you use or you will be locked out! (If that happens, there are ways to get around it though). Logging into Admin, you will notice a tree just like in MODX. The Admin runs on jQuery UI and as you’ve seen, it is insanely fast! Don’t be fooled by its simple facade. PW is a really powerful CMS, highly extensible and very easy to use. Customising the PW admin is very easy. There are a number of custom themes available. It is also trivial to make yours. Custom Admin themes go into the folder site/templates-admin/. You can have only one theme at a time. On a related matter, if you wish to create a custom Admin page, it is easy to do so. See this thread for more info. 2. File System After installing PW, you will see two main folders; “site” and “wire” in your file system. Site is where all things related to your site reside. This is your playground and will survive an upgrade. Wire houses the Core. You will never have to go into that folder. 3. Resources In MODX, Resources can be many things (documents, etc.). There is no such term in PW. However, the most important “resources” you need to know about in PW are page and pages. Pages are a very powerful concept in PW. Page can refer to your website’s frontend pages, i.e. what can be viewable by your website users. I say can be for a reason. There are many uses for Pages in PW. This can be confusing to newbies but once you get the concept, you will appreciate the power of the system. Just because something is a Page does not mean it has to be viewable. It can have other uses such as a container that holds data for use by other Pages - in this case the Pages do not have to be displayed on the frontend. In fact, everything you see on the PW tree is a Page. That’s right; even the Admin and its components (Users, Roles, etc.) are all Pages! Still confused by Pages? Have a read here. Pages reside in the PW tree - you may have noticed . You can drag and drop pages to move them around. If drag and drop doesn’t work you probably have MySQL 5.0.5.1 installed. Upgrade your MySQL and you are sorted. The root of your site is the uppermost Page in the tree. In the default PW install this is called Home. You can change the name to something else. The default PW install comes with a number of Pages pre-installed. Try editing a Page. All those Fields you see on that Page when under the “CONTENT” tab? They are not default Fields. They are all Custom Fields! Yes, not even the Title! The only required Field for a Page is “name”. You find this under the “SETTINGS” tab on the page edit screen. More about Fields below… Other related stuff: Menuindex: As an aside, if outputting something like a menu, unless you state otherwise, it will reflect the tree hierarchy. Show in Menu: This functionality is covered by the Page status, whether hidden or not. Hidden pages do not get output on menus (more about menus later) unless explicitly stated so using PW API selectors (see below). Menu Title: No such term in PW. You can name your menu items what you wish to name them. Very important: All Pages must be assigned a Template. 4. Templates In PW, Templates mean something slightly different compared to MODX and many other CMS. MODX describes templates as: That is not entirely true of PW Templates. In PW, the term Template is used in the sense of the English definition of the term: PW Templates serve as a pattern for the foundation of your Pages. By foundation, I do not mean the HTML or CSS. Rather, the Template servers as blueprint for your Pages. What is available to the Template is available to the Page that uses it. Templates establish a pattern for the Pages by the inclusion of Fields to the Template. A Template can have as many or as few Fields as you wish. You can create as many or as few Templates as you wish. You can easily change the Template a Page uses when editing the Page. See under SETTINGS. Note that if you have Fields on that Page that are not in the Template you are switching to, those Page Fields will be lost! PW will warn you about this when switching Templates though. OK, so how do you show “Resources to the world”? That will be the work of Template Files which we’ll look at in section 6. 5. Template Variables A powerful feature of MODX is Template Variables (TVs). If you loved MODX TVs you will absolutely adore the PW equivalent. In PW, TVs are known as Fields. You can define your own Custom Fields. In fact, you will need to create your own in most cases. This is because PW does not have any required Field except for “name”. It is perfectly reasonable to have a Page with only the name Field! Many people do add at least a Title Field for such Pages. In the default PW install, the reason you see the Title Field in all Templates is because it has been set as a “Global” Field under the ADVANCED settings of the Field (edit the Field to see this setting). There are many types of Fields to hold all sorts of data - images, texts, urls, passwords, reference to Pages, etc. You can call your Fields anything you wish. You can call the Field for your main content “body”, or “stuff”, or “content” or whatever you wish as long as you follow the naming convention, i.e. “[a-z], numbers [0-9], or underscores (no dashes or spaces)”. Fields are reusable across different Templates. The order in which they appear on your Page follows the order in which they are arranged on your Template. However, it is important to note that: The order in which Fields appear on your page and/or the inclusion of a Field on your Page does not mean that: The Field will be output on the Frontend. The inclusion of a Field on a Page does not automatically mean it will be output; PW does not make that decision for you. It only makes the Field available to you to use as you require. You can output all or none or few of the Fields on your Page. The order in which Fields appear on a Page does not mean the same order will be reflected when you output the Page. You make that decision. Also note that you are able to arrange Fields side-by-side on your Page (via settings on the Page’s Template) to mimic your site’s layout or for other visual/ease-of-use purposes as you edit the Page in the Admin. You can also give each Field a label and a description. These will appear above each Field when editing a Page. In most cases, the content of Fields will be saved directly to the database. In the case of file related Fields, the path to the file will be stored in the database. There are no direct equivalents of MODX TVs “@Bindings” (data sources). These are inherently built into the different types of Fields. Note that you cannot run PHP code within Fields (so no @Eval). This is by design. Fields are a very powerful and much loved concept in PW. Just Google "custom fields cms" and you’ll see what comes up tops. 6. Template Files So far, we've seen that you create Fields, add them to a Template you've created and edit a Page using that Template to input your content into that Page’s Fields. So far so good but how do you output the content to the world? You do this via Template Files. Template Files live in /site/templates/. You have to create your own Template Files. In MODX, a Template will have both system fields, e.g. body, title, etc. and custom fields (TVs). Rendering a Template is achieved by adding MODX tags to your Template. In PW, in order for the content of your Page to be seen by the world, its Template must have a Template File (or there must be some other Template File associated with a different Template that is dynamically pulling and outputting elsewhere the content of a Page whose Template does not have a Template File). This does not mean that all content within a Page will be automatically output by the Template File. No; in the Template File you can choose to render all or some Fields present in the Pages using that Template or none at all! You tell the Template about the associated Template File when you create/edit the Template. PW assumes that there is a Template File with the same name as the Template in /site/templates/ and will tell you if it does not find one. However, you have two other choices. You can either enter an alternative name for your Template File or tell PW you do not wish to have a Template File for that Template. This means that a Template does not require a Template File. Obviously, in such a case, you will not be able to directly output the content of the Pages using that Template. In some cases, that is exactly what you want . As you get to know more about the system, you will find out how powerful and flexible the PW Template system can be. For instance, you can use your Template as a controller. That’s beyond this guide but feel free to search the forums for more info. Template Files are typically PHP files with logic to dynamically output your content. In most cases, Template Files are HTML with PHP tags inserted to output your content. The PHP in the Template File will in most cases be PW API. Hence, you will see things like $page and $pages in Template Files. The former always refers to the current Page and the latter to any other Pages in the system. These are very powerful variables in PW and give you access to ALL information about ALL pages including their Fields and whether those are empty or not, etc. See below for more info about these variables and have a look the docs too. Note that Templates do not care about what’s in your Template Files. In fact, they won’t even check. All they want is for you to tell them if and how you wish your Pages' contents to be rendered. Your Template Files can even contain pure HTML (although that won’t be dynamic!)! Your Template Files can have references to other things related (or not related!) to the Page using that Template File. For instance, within your Template File, you can pull in the 10 latest “posts” from your Blog or the Children Pages of that Page. There are just too many possibilities to list them all here. Don’t let the PHP in Template Files scare you if you are no coder. I am no coder but I am able to use PW. You will only need to know at least some very basic PHP to use PW. The most important are: echo; foreach; and if… Anything else is a bonus in most cases. In addition, you will need to know how to use the two most important PW variables - $page and $pages. With these two, most of what you would have done in vanilla PHP is covered. They are easy to use and to understand and very much follow the jQuery concept. Check out the docs to learn more. 7. Snippets In MODX, Snippets are the method by which MODX allows you to run dynamic PHP code in any of your pages. In PW, the term Snippets does not exist. What!?! Not to worry; in PW MODX-like Snippet functionality can be achieved in two ways: Template Files: Most PW Template Files are essentially dynamic PHP code. That’s Snippets for you right there. PW Modules: PW Modules do what MODX Snippets do and more (see below). It’s just an issue of terminology. For instance, the popular MODX Snippet WayFinder has a Module counterpart in PW. This is the Module Markup Simple Navigation. However, you do not need to use the Module to create a menu in PW. You can do the same thing using PHP in your Template File. See the default PW install for a simple example. Check out section 12 of this guide for example “popular-MODX-Snippets-to-PW-how-tos”. 8. Modules MODX Evolution defines Modules as “a program that can only be executed from within the manager.” There are PW Modules that fit this definition, for instance, the Module Batcher which is equivalent to the MODX Revolution add-on Batcher. However, there are other PW Modules that are executed in the frontend, e.g. Markup Simple Navigation previously mentioned. In fact, in PW, a Module is PHP that extends the functionality of PW. Modules contain PHP classes that adhere to PW’s Module interface. 9. Plugins In MODX Plugins are PHP code that are set to execute during certain system events. In PW, although the term Plugin does not exist (except maybe in reference to Modules), MODX Plugin functionality is easily doable in PW. This is achieved via Hooks. There is one difference though. In MODX, Plugins are standalone code you can download and install. You cannot download and install PW Hooks. Instead, PW contains many methods that you may hook into in order to modify the behaviour of the method. In other words, PW offers the ability to hook into its processes/events and manipulate them before or after the event or even replace them, etc. Hooks are usually invoked inside Modules. However, Hooks may be attached from anywhere that you use PW's API, for instance in Template Files. The average PW user will not need to use Hooks. For more info about Hooks check the documentation. 10. Chunks MODX defines Chunks as “bits of static text which you can reuse across your site”. There is no equivalent term in PW. You can, however, easily create Chunks in PW. You can create Chunks as a Page that contains various Fields each of which can act as a Chunk. This means you can have Chunks of all sorts of data. You can then set the Page you create to hold your Chunks as hidden (not available to searches). The Page can also be assigned a Template without a Template File to further limit frontend access. It can also be created as a child/grandchild of the page Admin. That will limit access by User (e.g. login required to view it in Admin). Accessing the Fields of that Page as your Chunks using PW API is quite trivial really. Since you can use labels and descriptions to further define each of your Pages’ Fields, this makes it quite easy to describe what each Chunk is for and/or give instructions on how to use the Chunks. See this example for more info. You can also simply use text files to pull into your content as Chunks. Personally I prefer using Pages as Chunks when I need to. In MODX, it is usual for many Snippets to use Chunks (HTML + placeholders) to structure their output (i.e. tpl Chunks). You do not need to do this in PW. Code output can be wrapped in HTML right within the Template File. The important thing to remember is that any Field in any PW Page is available to any other Page and any Template File. Cross-referencing Fields and Pages is child’s play. Seriously; it is that easy. 11. Miscellaneous Tag Syntax: PW does not use a templating language (tagging syntax) like MODX does. See this article why this decision was taken. I agree 100% with the approach and have come to realise its many benefits over using a templating language. However, there are two Modules that allow you to use template language tags in PW. I have never used them so cannot comment further. They are here and here. Settings Page: PW has no settings page like MODX. Many settings are set in the /site/config.php. Other MODX settings equivalents are interspersed in various places including caching content on a Template by Template basis and in Modules. You can also store custom settings needed for your site in the /site/config.php. You can even use Pages to store your settings as mentioned in section 10 (Chunks). Modularity: PW is a very modular system. The whole of PW is made up of Modules (Core Modules) that accomplish different tasks. 12. Examples - the PW way… In this section I will show you equivalent MODX versus PW add-ons as well as how to accomplish various task using PW “Snippets” equivalent. a. Template Variables As previously mentioned, MODX TVs are PW Fields (although PW Fields are more versatile). Outputting the contents of your Fields is very simple. echo $page->name_of_your_field; This gives you the contents of the Field in the current page. Works slightly different for image fields though. For other pages echo: One page $pages->get(ID or PATH or NAME, etc.)->name_of_your_field; //note replace ID with ID of the Page you want, etc. Many pages $pages->find("selectors"); //this will return an array. You can then go through the array using foreach as shown in the examples below to output the field(s) contents MODX - output main content of Page //MODX Evolution[*content*] //MODX Revolution[[*content]] ProcessWire - output main content of Page //ProcessWire echo $page->content;//note; this assumes you have a Field called content in the Template of the current page. In ProcessWire you can find Fields of other pages like so $fruits = $pages->find("template=yumyum, limit=10"); foreach($fruits as $fruit) { echo "<li><a href='{$fruit->url}'>{$fruit->title}</a></li>"; } //find 10 Pages that use the Template yumyum and echo their url and titles in a list. From these examples, you can see the elegance and flexibility of TVs done the PW way. Since there is separation between a Template and a Template File, you can conditionally echo out the contents of Fields found in Pages. b. Snippets Common MODX Snippets and PW equivalent Modules 1. WayFinder: Markup Simple Navigation or code in Template File (see head.inc in default PW installation for a simple menu). 2. Ditto (Evolution) and getResources (Revolution): Functionality inbuilt in PW. Use $page and $pages variables + selectors to find anything, anywhere. 3. Jot (Evolution) and Quip (Revolution): Comments Module is part of the PW Core. It is not enabled by default. You will have to enable it in the Admin. See also the related Comments Manager Module. 4. eForm (Evolution) and FormIt and FormItBuilder (Revolution): There are various Form parser codes in the Forums. There is also a commercial Form Builder Module. It’s not expensive, is developed by PW’s lead developer and proceeds support the PW project. 5. MaxiGallery (Evolution) and Gallery (Revolution): Presently, there is no equivalent. However, it is quite easy to build a photo album. See this tutorial in the wiki. There is also an Images Manager Module (still in alpha though). 6. AjaxSearch: Ajax Page Search Module. 7. Breadcrumbs: Quite easy to accomplish using PW API. See default PW install for an example. 8. FirstChildRedirect: Very easy to do using PW API like this: $session->redirect($page->children->first()->url); in a Template File. 9. getField (Evolution) and getResourceField (Revolution): Inbuilt in PW $page and $pages variables as shown above. 10. GetParent: Inbuilt in PW $page and $pages variables. E.g. $page->parent. 11. getPage: PW has inbuilt pagination as part of the Core (Pagination Markup Module). See this article for a quick tutorial. 12. UltimateParent: Inbuilt in PW API as rootParent. 13. if (Revolution): Use vanilla PHP with PW variable and selectors in Template Files. 14. VersionX (Revolution): Versioning for text-based fields is coming in PW 2.4 (release date summer 2013). Support for maintaining separate draft and live versions coming in PW 2.5 (Winter 2013/2014). Currently, there is also the Module Version Control for Text Fields. 15. getRelated (Revolution): No out-of-the-box Module for this. Has been previously accomplished using PW API in various ways. Have a look in the forums. 16. importX (Revolution): Import Pages CSV Module. 17. phpThumbOf: Thumbnail functionality is inbuilt in PW. There is also the Module Thumbnails that further extends this functionality. 18. getValue and getValues (Revolution): Inbuilt in PW. You can get the value of any Page using PW API - $page and $pages. 19. getFeed (Revolution): RSS Feed Loader Module. 20. MIGX (Revolution): Repeater Module which is part of the PW Core. It is not installed by default. You will need to do that yourself. For more info see this tutorial. 21. Articles (Revolution): See the Blog Profile Module. 22. NewsPublisher (Revolution): See below under Plugins. Examples MODX Ditto [!Ditto? &parents=`5`&extenders=`summary` &tpl=`tplBlog` &orderBy=`createdon ASC`&display=`6` &truncText=`Continue Reading This Article` !] PW equivalent $items = $pages->get(5)->children("sort=date,limit=6"); foreach ($items as $item) { echo $item->title; echo $item->summary;//etc. } //this assumes you have a Field called summary on that Page The first line in the above gives you all information about the 6 child Pages of the Page with ID #5. It returns an array. In other words, a basket of various documents containing all the info about those documents. Next, you traverse the array using foreach. In layman terms, you rummage through the basket picking goodies! In order to wrap HTML around the code output, we do it like this instead (there’s other ways to do it as well!) echo "<ul class='articles'>"; foreach($pages->get(5)->children("sort=date,limit=6") as $item) { echo "<li><p><a href='{$item->url}'>{$item->title}</a><br /> <span class='summary'>{$item->summary}</span></p></li>"; } echo "</ul>"; In this example, we have asked PW to grab the child Pages directly within the foreach rather than creating a variable $items first. MODX getResources // Output a list of child Resources of the current Resource, using the 'myRowTpl' chunk: [[!getResources? &parents=`[[*id]]` &tpl=`myRowTpl`]] PW equivalent echo "<ul>"; foreach ($page->children as $child) { echo "<li><a href='{$child->url}'>{$child->title}</a></li>"; } echo "</ul>"; //You might want to limit the number of child Pages you are getting if they are many! MODX getResources // Output the top 5 latest published Resources beneath the Resource with ID '5', with tpl 'blogPost': [[!getResources? &parents=`5` &limit=`5` &tpl=`blogPost` &includeContent=`1`]] PW equivalent echo "<h3>Latest Posts</h3>"; $posts = $pages->get(5)->children("limit=5"); foreach ($posts as $post) { echo $post->body; } c. Modules 1. Batcher and Docmanager (Revolution): Batcher Module (covers most equivalent functions). 2. DocFinder (Evolution): Inbuilt in PW default install. d. Plugins 1. QuickManager (Evolution): Several Modules can do this, i.e., Fredi, Page Frontend Edit and Inline Editor Modules. 2. ManagerManager (Evolution): Same functionality can be achieved using Templates, Access Control and the Modules Page Edit Field Permission, Page Edit Per User and Page Edit Per Role. e. Chunks See this example. Btw, the PW Cheat Sheet is you best friend... Hope this has been helpful! /kongondo
    10 points
  2. The site's been live for about 2 months now, but I thought I would share the first of many projects I plan to build with Processwire. http://romania-meubelen.nl is a site I designed and built for a small Dutch company specializing in Teak furniture. There's a lot of complex logic built into the calculating of the prices when combined with different sizes and finishes, but Processwire definitely made it a whole lot simpler to build.
    4 points
  3. Oh, another owzim question $val = $pages->find("template=mytempl, sort=-counter, limit=1")->first->counter + 1;
    4 points
  4. Nothing earth shattering, but easy to implement. <ul class='breadcrumb'> <?php foreach($page->parents as $parent): ?> <li itemscope itemtype='http://data-vocabulary.org/Breadcrumb'> <a href='<?php echo $parent->url; ?>' itemprop='url'> <span itemprop='title'><?php echo $parent->title; ?></span></a> <span class='divider'>›</span> </li> <?php endforeach ?> <li><?php echo $page->title; ?></li> </ul> It's based on the breadcrumbs in the default PW profile, but the presentational markup is Bootstrap flavoured. Try it and copy the resulting html snippet into Google's rich snippets testing tool - http://www.google.com/webmasters/tools/richsnippets.
    3 points
  5. Thank you guys, my problem is solved. All I did was created a new permission called as "add-review" and added it to the user role called "registered". Using code given below, I checked if the current user has the permission to add review. For future reference of anyone like me, following is the code I used, pretty simple: echo "<div id='reviews'><h3>Viewer Reviews</h3>"; echo "<div class='CommentList'>"; foreach($page->drama_reviews as $comment) { if($comment->status < 1) continue; // skip unapproved or spam comments $cite = htmlentities($comment->cite); // make sure output is entity encoded $text = htmlentities($comment->text); $date = date('m/d/y g:ia', $comment->created); // format the date echo "<div class='CommentListItem'><p><strong>Posted by $cite on $date</strong><br />$text</p></div>"; } echo "</div>"; $perm_to = $permissions->get("name=add-reviews"); if($user->hasPermission($perm_to)){ echo $page->drama_reviews->renderForm(); }else{ echo "<h4 class='center-text'>You need to be logged in to write a review. Please <a href='{$config->urls->root}profile/login/'>Log In</a>.</h4>"; } echo "</div><!--#reviews-->"; Thanks to horst & andrian for help.
    3 points
  6. Hi Roope Always use: $selectorString = $sanitizer->selectorValue($stringWithCommas); Pw sanitizes the selector string e.g. quotes it when there are commas present.
    3 points
  7. That should work, yes! But that's not exactly what I am suggesting, no! It depends on if you have different kind of registered users. If all registered users are allowed to add-review, you don't need extra permission, you only check if user has the role. And if you have registered users that are allowed and some that are not allowed, you need other rules to check. As an example: If you have registered users that have allready bought tickets and users that have not, and only the users that have bought tickets should be allowed to add-review, you want to check for: $user->hasRole($role) && count($pages->find("ticket_reference=$user")) > 0 I think you only would check for a permission if you have different roles, and some have the permission and some have not. So you have to check only one thing. EDIT: sorry, last post has taken a bit time, (has to do a phone call), and now you are allready done.
    2 points
  8. Not sure that you need to get that complex. I did the following. Not sure how you handle front end logins or redirects from the login page, but you get the idea. if($user->isLoggedin()){ echo $page->comments->renderForm(); } else{ echo '<hr /><br /><h3>Post Comment</h3><p>To leave a comment, you must be <a href="/login/?pid='.$page->id.'">signed in</a></p>'; }
    2 points
  9. Microdata is always good to have, thanks for sharing this! Personally I wouldn't depend too much on data-vocabulary.org though. Their home page makes it pretty obvious that schema.org is the new toast of the town. With schema.org vocabulary breadcrumbs could be implemented like this: <body itemscope itemtype="http://schema.org/WebPage"> ... <div itemprop="breadcrumb"> <?php foreach($page->parents as $parent) { $end = ($parent === $page->parent) ? "" : " > "; echo "<a href='{$parent->url}'>{$parent->title}</a>{$end}"; } ?> </div> <!-- this follows strictly schema.org example --> Or with markup matching above example: <body itemscope itemtype="http://schema.org/WebPage"> ... <div class='breadcrumb' itemprop='breadcrumb'> <?php foreach($page->parents as $parent): ?> <li> <a href='<?php echo $parent->url; ?>'> <span><?php echo $parent->title; ?></span> </a> <span class='divider'>›</span> </li> <?php endforeach ?> <li> <?php echo $page->title; ?> </li> </ul> <!-- this isn't exactly what schema.org describes but should still be valid.. --> There's quite a bit of discussion floating around whether schema.org version of breadcrumbs is actually useful, but it is what their example currently suggests. Note also that breadcrumb is a property of WebPage, ie. you'll have to be in that context in order to use this properly.
    2 points
  10. LiveDemo I have uploaded a small LiveDemo with only 7 truncated songs. But it's pretty fine to view all Demos and the additional $page->properties. demo song page demo album page demo artist page demo genre page
    2 points
  11. Another factor to consider with the current solution is that it depends on an autoload module (executed on every request). That's a little less efficient than a solution that is specifically called upon when needed, as an Inputfield would be. From that respect, it would probably make sense for this to be InputfieldTextareaCounter. It would also be the simplest and most straightforward to implement and maintain. The drawback would be that you couldn't apply the counter functionality to other types of unknown future textarea derivative inputfields. But if someone is making a new text inputfield, chances are it's like TinyMCE, ACE editor or some other type of thing that wouldn't be compatible with the counter anyway. Ultimately the functionality provided here is pretty darn useful regardless of how it's implemented. But if I were implementing it myself, I'd probably make it an Inputfield rather than an autoload module. As a bonus, this would also guarantee compatibility with non-admin Inputfield forms, like those from FormBuilder, FormTemplateProcessor or API generated Inputfield forms.
    2 points
  12. hi all, new PW site launch: http://www.ohmspeaker.com/ some of the modules that were helpful or essential for this: cropimage formbuilder fredi importcsv minify piwik analytics procache batcher redirects version control template decorator modules manager page link abstractor sitemap xml admin custom pages markup simple navigation (for the sitemap) forum topics related to this site dev: Legacy Site URL redirects: http://processwire.com/talk/topic/3641-redirect-legacy-url-to-new-pw-page/ Clean up spelling: http://processwire.com/talk/topic/3519-use-api-to-spellcheck-whole-siteclean-up-spacing/ hashes in URLs on change selected product http://processwire.com/talk/topic/3496-help-with-url-param-change/ FormBuilder http://processwire.com/talk/topic/2904-how-to-redirect-by-id/ http://processwire.com/talk/topic/2821-3rd-party-send-conditionally/ http://processwire.com/talk/topic/2820-use-session-to-remember-form-selections/ Custom Menus http://processwire.com/talk/topic/2787-custom-menu-not-related-to-page-tree/ other notes: The skyscraper profile provided the example for how to get started with the advanced product search, a.k.a. the speaker finder. The standard search has been extended to show results in different categories. there is some use of Soma's word limiter for the news teaser text, and for making meta descriptions out of body fields, from this topic: http://processwire.com/talk/topic/3429-how-to-set-text-linecharacter-limits-in-templates/ the design is built on twitter bootstrap framework Fredi proved to be totally essential for the client, in being able to rapidly edit things without having to find things in the admin. This site is going to replace an existing site on a different domain (ohmspeakers.com). At some point we weren't sure if/how we would be able to handle the shopping cart element, and then found foxycart, which proved to be the best choice, very flexible, and easy to implement for this type of site. FC is hands down the simplest and easiest way (imho) we could achieve things like the legacy product pages, where there are various parts and upgrades displayed on 1 page. this version is sort of a "v1", and will be expanded/improved a lot for a v2, which would happen in about 4 months.. BTW - these speakers are really good; i now own 3 pairs ... they look great and do sound totally amazing...! -marc
    1 point
  13. Hi. I need "user profiles" for a project. So I looked for it for a long time in PW forum and then I came to a decision to make a module from Ryan and the others code. I share this code with you. Wait with great pleasure for your suggestions and comments Module page: https://github.com/orkhan/FrontendUserProfilesPW
    1 point
  14. Hi, I'm currently working out PW a line at a time by pulling apart each Site Profile found in the Modules section, referring to the cheat sheet and the great help docs. Thanks Ryan, Joss, Martijn-geerts and Soma I would love to see more Site Profiles uploaded! I'm being cheeky here, but are there any more users that would like to share their creations? Thanks in advance. Sorry, I have just noticed I posted this request in the wrong section. It should of gone in the Modules/Plugins!
    1 point
  15. Sorry I'm a little behind with messages here, I'll be caught up by mid week. But I've got a good excuse. Yesterday Karena Savannah Cramer was born. She is our 2nd daughter (Hanna Ryan, age 3 is our first). We will all be coming home from the hospital hopefully tomorrow.
    1 point
  16. Is there a neat an straightforward PW way of incrementing a value of a field other than getting all pages with that template an figuring out the highest value through a loop or something? In this case it should not be a regular auto increment but a number one higher than the highest of the already inserted pages.
    1 point
  17. But it (actually) do not work with PW 2.3 when you have MultiLanguage enabled. If you do not use MultiLanguage, it still works pretty fine!
    1 point
  18. Thx for the links Wanze. In my case, initially, I thought it was only in Modules that I'd use wire. I was working on a function last week and gotcha! out of scope bit me . I think as the forum grows, we'll need a FAQ board to point out such issues.
    1 point
  19. so, the OP also uses other variables in his functions from global scope: global $Server; he also can set it like this: global $Server, $wire; and than it should work. But personally I only use the wire('something')->Version within functions.
    1 point
  20. Hi Ryan Thanks for your help! You where completely right. There was a link in the module to one of TinyMCE's javascript files. (tiny_mce_popup.js). I changed the path and now it works perfectly. By the way, I'm a big fan of Processwire. I always kept my hands off all CMS, because it seemed so difficult to me to have functionality and freedom for the design at once. With PW everything seems possible. Great work! tron1000
    1 point
  21. Thanks Ryan. It was really massive learning to write this together. In fact I have (re)written it three to four times. Every time I want it to do something from what I don't know the PW-way, I have done it old-schooled first. Then a few days later, I've found informations here in Forum or in the docu that show me how to do it better. And I have rewritten it. Much work, much fun, me.better PW.coder now. ( but also much.much.much.more to learn ) The only downside with that project is that I now don't like my (before LocalAudioFiles) new created (but still not finished) portfolio site any more. I have trashed it and started new from scratch. With it there are new things like sessions, redirects, cookies and, ... yes, again: much.learning!
    1 point
  22. Really impressed by all you've put together here Horst, nice work!
    1 point
  23. Great guide Kongondo! Beyond being helpful to people familiar with MODX, I also think this guide would be helpful even to people that don't know MODX, as it introduces many ProcessWire concepts very well. Also, I'm not particularly familiar with MODX, so found it helpful in learning about MODX too. Thanks for your great work here.
    1 point
  24. @Adrian Cool, that's a very simple & straightforward solution. I think it get's the job done, I'll implement that. Thanks a lot. Now I feel dumb, why I didn't think about that. But now that we're anyways talking about adding permissions to roles, I'd like to know how it can be done. Let's keep hunting for it.
    1 point
  25. Hi, I don't know if it is the right way to add a permission, or if it just would be enough to check a users role. But I think the system only knows what you implements If you use permissions, you want to check: $user->hasPermission($permission) If you use roles, you want to check: $user->hasRole($role) More variations can be found in CheatSheet under user, roles, permission. (But don't forget to click the advanced-button! in TopNav the right one!)
    1 point
  26. Always in functions: wire('pages')->get() // Not $wire->pages or $pages Seems like this problem comes up twice per day Does it work?
    1 point
  27. Hi, Valan. I guess you should try to log the inputfield name in a cycle just before LanguageSupport.module on line 380 so you could understand when it breaks. Also try to substitute line 379 temporary just to see if the problem remains: if(!$value && (!$inputfield instanceof Inputfield)) continue; Seems like you have some problem with an instance of a wrong class. Have no idea what causes this error. Cheers.
    1 point
  28. 1 point
  29. See http://php.net to see what all you can do in ProcessWire For conditionals: http://www.php.net/manual/en/control-structures.if.php In PW short way is for example echo $pages->get("title|headline"); saying if title has value output title, otherwise get headline
    1 point
  30. No idea why the '+' sign is removed. It happens here: // disallow some characters in selector values // @todo technically we only need to disallow at begin/end of string $value = str_replace(array('*', '~', '`', '$', '^', '+', '|', '<', '>', '!', '='), ' ', $value);
    1 point
  31. This looks great Kongondo!! Although I don't know anything about MODX, I will read it tomorrow in the morning in my Kobo reader If someone else feels like, here is the ePub file that I created (Apparently I can't upload .epub files to the forum, so I'm sharing in Google Drive) https://docs.google.com/file/d/0B6RyV62pA8iwTm1BTnNOYmRYRDA/edit?usp=sharing
    1 point
  32. Hi, and welcome Judging by this sentence, I would say you are in the right place. Still, I would advise you to read Ryan's answer to this post to make a decision about building something like this with PW http://processwire.com/talk/topic/3549-can-i-build-my-project-using-processwire-events-ecommerce-trip-sharing-community/ About your concerns: Yes, the system can handle thousands of users/related pages/numbers of posts etc and it can be scaled up without problems. Scalability is one of the strong points of ProcessWire.
    1 point
  33. Hi Peter, That's because all the API variables like $users, $page, $pages... are not known to the function. PHP - scope problem. The solution is to use the global wire() function from Pw to get the API variables: $vista = wire('page')->vista; // ... if (wire('user')->language->title != 'no')) { // ...
    1 point
  34. Hi ryan, thanks a lot for your reply. The test hosting account had only a mysql version 4. After having checked the system requirements of PW i installed it on another webserver satisfying the requirements. Now processwire seems to work without any problems. The reason for the posted error messages was the wrong mysql version. Thanks a lot!
    1 point
  35. Ryan, yes, I kind of missed the point. Since with TemplateFile class the actual template files is not automatically connected to the template itself which makes it necessary to pass certain variables if you want to use it like in this $page->render() context. So now I got how powerful it actually is to use context sensitive templates, and you can totally automate this too. Prefix your template files with contexts like: team-member.php home-team-member.php sidebar-team-member.php and use it like: $child->render($page->template . '-team-member.php'); If the template is called when being the actual page, render() is called automatically, so it's loaded the unprefixed team-member.php then. Awesome stuff.
    1 point
  36. Greetings Everyone, Sorry I missed this discussion until now. Yes, I am working on a ProcessWire book and companion Web site. As a technical writer/developer/designer, ProcessWire has been an inspiration on multiple fronts: creating Web sites, going deeper with design/development, and writing/documenting the system. I've been working regularly on the book project, and I have about 175 pages completed already. I'll have much more to share in the coming weeks. Stay tuned, Matthew
    1 point
  37. First of all I apoligise for writing such a long post… was not intended. I'm happy to have found this CMS. I guess like most of us, I came here because somewhere somehow we found a reference to somewhere which leaded us somewhere else and then somehow we landed here In my case I landed here from the CMS Symphony forum, as someone there mentioned Processwire is something to watch out as it looks really cool. Anyhow I don't know if I'm an average Processwire user, and most probably no the right user to create something using Processwire. Why, well, I'm not a programmer, I really have no idea, I could not build the most simple script, I know the most basic HTML and most simple CSS and even though I was able to build simple Expression Engine websites, I'm one of those that knows somehow how to make changes in a template using Firefox firebug or build websites using Wordpress and plugins, so I'm able to build anything as far as I don't have to create much code. I don't know if there are more users as me here, anyway, I wanted to make clear which are my current knowledge limitations but I like learning. So, why am I here? because I have a personal project, I want to do it myself and although I could do it entirely in Wordpress using a bunch of plugins, I'm not sure if that would be the right choice. I have tried to make it entirely using Invisionpower Suite, and although it works in some way, it is not what I really want. So what I want to build is this: A website where users and organizers are able to enter, publish or list events or activities and those users who want to assist to those activities should be able to share their car or accommodation or meet o get know each other even before going to that activity. People who have participated in those events or activities should be able to rate or leave comments about how was that event so that next assistants know if its worth or not to go and organizers can get the benefit of feedback. Kind of an Activities and Events Community with Trip, Accommodation and Informations sharing between assistants. So that is what I'd like to offer: - The activities could be free or pay activities. - Event Organizers should be able to decide to sell pay events on this website using their own paypal or the gateway should be able to calculate a commission in case website's own paypal must be used (small commission for me, the rest for them). - Organizers and users should be able to see how much and how many events tickets are being sold and who is assisting. - People that want to assist to an event should be able to announce that they will assist and if they want, share their car or travel ways with other users going to that event. Ideally when an event is published, you could see e.g: If the event is Barcelona someone from Madrid is going to that event as well by car, so you could just contact that person from Madrid and book a seat in his car. That person from Madrid should be able to list his trip, car model, free seats, seat price, and so on, and when someone else book that seat, then it should show that already one person is driving there in that car with him so that there is still let's say two seats left… same thing for shared accommodation... so you get the idea. - Assistants should be able to share accommodation in case they live near where the event is taking place or maybe anything else… not sure what this project will lead up to, maybe users want to share anything else, or have other demands. - I'd like also to be able to show those activities in a calendar, but an Agenda view would be enough, as there is not such a thing anywhere. - Users should be able to sort and filter those activities (as I see in Processwire that is not a problem) - I was also thinking on integrating a forum but the thing is that without a proper bridge or integration, users end up having two profiles. Having a kind of SSO would be nice. So I think of several ways to do this: 1.- The Wordpress Way integrating following components: - Wordpress - wp-types.com plugins (Forms, Custom Types, Woocommerce plugin, Views) or the ACF (Advance Custom Fields) from http://www.advancedcustomfields.com/ - Woocommerce e-commerce plugin - Woocommerce extensions - Wordpress Affiliates Woocommerce Plugin - Invisionpower IP.Board - Wordpress IP.Board Bridge. - Or integrate it with the new moot comments | forum platform from moot.it, although I must say I like IP.Board. 2.- Expression Engine and the necessary modules (which I have to figure out yet), their forum module is terrible to put it kindly. And after reading their last moves about how are they dealing their Customer Support to small customers, I don't know what to think. I also don't like that in Expression Engine you are not able to add a user to more than one group and that could be a limitation when you build a community oriented website. On the other side there are tons of modules for it. 3.- InvisionPower IPS: I have be able to do most of this customizing the IP.Downloads App module but the end result has lot to be desired. And Invisionpower Suite although it is a really good product, their documentation and Customer Service is not really oriented to help users to build this kind of projects using their platform. 4.- Craft CMS which is still in development, looks really good but lacks an e-commerce module 5.- Processwire which looks amazing. I saw there is an ecommerce module but not sure if I had the necessary skills to adapt it to my needs. And on the other side I guess I'll find myself asking silly questions (for advanced users here) all the time. What do I prefer?… of course the very best thing would be to be able to make it using one single flexible platform and use as little 3rd party modules as possible. Wordpress is not a fast and secure platform and the more plugins you combine within well the slower it can get. What do I like from Processwire? - Simple - Fast - The Form Module looks amazing - The Pro Cache module looks impressive - Updating looks very easy (as I understand just overwrite the Processwire folder with the new version, change index.php and httaccess file) - Documentation (Although I'd have to read it 100 times) looks promising - Great Community, not big right now, but looks very dedicated and friendly. - I like that it works with anything on it (similar to EE) - I have seen that some built sites do similar things as what I want to build. - Built already for Multi-language in mind - It amazes me that there are so much done in such a young system. - It looks as Ryan is a kind of Genius So do you think honestly that someone with my limited skills could build a project like this using Processwire? I think I need so skills I have not right now and I'm specially worried with the commerce aspect of my project… but I'd like to know your opinions about this. Thanks Mario
    1 point
  38. Hey Everyone, That is an ambitious project! I agree with all that Ryan said. I want to highlight one statement in Ryan's post that I think is most apt here: "But stay with us here and start learning ProcessWire in smaller chunks and on smaller projects, and before long you'll be ready to build anything you can imagine." That makes a lot of sense. I would also add this: instead of looking at the whole project all at once, make a list of each individual challenge in your project, then look for the ProcessWire solution for each one. This is what I did when first using ProcessWire, and I keep using this now for each new project. It is not only a way to learn ProcessWire, but it also becomes a great way to organize your project planning. You will be amazed how even rather complex needs have very elegant solutions in ProcessWire. Thanks, Matthew
    1 point
  39. This case study relates to the topic here: http://processwire.c...ndpost__p__8988 about creating an archive of 'stories' about how PW has helped in relevant real life scenarios. Website: http://www.ray-dale.com RayDale Multimedia Ray Dale is a multimedia designer. His portfolio website was 2 years old as of March 2012 and in need of a refresh. He found that the content management for his website was more time consuming than he wanted and the website was generally slow in performance and complex to update. Ray needed: A website that could showcase his latest work with separate portfolio content types The ability to show lots of images and videos in each section Complex interlinking between each portfolio item - where each item would belong to a number of simultaneous categories To be able to publish a number of pages under various sections on the website To have a condensed navigation structure - not over-facing the user with navigation A blogging space that was easy to update To gain complete control over the HTML, CSS & JS markup and therefore the design of the website The ability to take more control over the admin experience - without using a host of plugins - so that the CMS could be used for clients to make their lives easier Speedy performance - even if a shared hosting platform were used Good site security The previous solutions Ray was previously using Drupal as a content management system. Drupal is a great system, it’s incredibly flexible, it can be made faster and using template overrides, almost complete control can be taken of the HTML and CSS output. However, the process to achieve any of this is time consuming and clunky from a web designer / front end developer perspective. Drupal was also going to require a number of plugins to be installed to achieve a lot of the required functionality. Ray tested migrating his website over to WordPress. WordPress is another fantastic blogging system with light CMS functionalities. WordPress is generally easier to use than Drupal and a lot of control over the HTML & CSS markup can be delivered - in a much easier manner than Drupal. However, WordPress is still light on CMS features in the admin system. This means that it is difficult without either using a lot of plugins or custom php development (using the WordPress API) to have custom content types and fields. The decision to use ProcessWire Having searched around for an alternative to Drupal and WordPress - revisiting other CMSs that Ray had also previously used - Ray eventually landed on ProcessWire having read about it on a forum. Right from watching the initial video produced by Ryan Cramer (the creator of ProcessWire) Ray was intrigued by the possibilities that ProcessWire seemed to offer - effectively solving all of the issues currently faced. To summarise ProcessWire offered: Custom content types in the admin Custom field types in the admin Good control over media uploads A simple to use admin system A neat and simple API for custom frontend / backend development A customisable admin experience The ability to have a custom admin url Complete control over HTML markup Good security with flood control A powerful and flexible templating system (that was also simple) Ray was extremely impressed by the features that ProcessWire offered, however, many CMSs look great until you actually start using them - where the unnecessary complexities, weak architecture and terrible, bloated functionality often start to appear. The functionality seemed so promising that a gamble was taken to build the Ray Dale Multimedia website - with very little time now available - to ProcessWire and test how it performed. Building the website Having built the original Ray Dale Multimedia website in Drupal, then converted to WordPress before deciding to gamble on ProcessWire - Ray now had very little time left to build his portfolio website. As a testament to the ease and speed of using ProcessWire - he was able (with a little help from articles in the forum) to rebuild the Ray Dale Multimedia website in two days of effective full time development. This included all of the content creation and learning the new system - with the inevitable (but surprisingly smooth) learning curve. Enabling complete control over output ProcessWire allowed Ray to write HTML and CSS without any of the interference you get from other CMS systems. So, Ray was able to use the following frameworks of his choosing: HTML5 boilerplate jQuery Modernizr Masonry A customised version of the 960 fluid grid system PrettyPhoto for lightbox images Less - to create minified CSS Though it must be said that literally anything can be used as ProcessWire makes no assumptions on the frontend - even on the Javascript framework. Quick and easy API One really pleasant surprise was the jQuery influenced API that ProcessWire offered. For example you can use php queries such as: $pages->find("selector"); $pages->get("selector, path or ID"); to find content in the system - you can even filter your queries by template type, fields attached to that item, etc. You can even use a range of selector operators. The API effectively works as a super powered and infinitely more flexible alternative to the WordPress loop. Cross referencing pages easily Complex cross-linking between portfolio items was needed so that capabilities, technologies and services could be linked to each item. It was easy to create a taxonomy system that worked the exact way required once the fundamental concept of how pages work in ProcessWire was understood. Building navigation that works Unlike a lot of CMSs that work effectively as ‘bucket systems’ - meaning that content is separate from any kind of structure or hierarchy by default in the system - whereas everything in ProcessWire is a page and arranged hierarchically. Whilst this may seem strange and restrictive to some used to the aforementioned ‘bucket systems’ - it works incredibly well and enables you to build navigational structures that are easy to plot a current location in. It is also something easy enough to break away from if you want a more ‘bucket’ type system. For example, in Drupal and WordPress it can be very difficult to highlight the navigation on a website if you are using custom content types. Try using custom post types in WordPress and keeping your navigation tracking which page the user has landed on - it’s extremely difficult without a fair bit of custom development (this is true as of the time of writing - WordPress 3.3.1). Because ProcessWire uses a structure and hierarchy by default - this structure makes building navigation that can track the current page very simple. Easy / flexible admin system The admin system in ProcessWire was easy and fluid to use, logical and stable. The admin system can also be overridden with templates (there are already some great community contributed templates). Modules used Whilst ProcessWire has a number of contributed modules from a thriving and helpful community - absolutely no additional modules were needed. All functionality on the website was achieved from a vanilla version of ProcessWire. Performance Another area of importance was the performance of ProcessWire. Again, Ray found this aspect to be well covered with built in caching capabilities that were thoughtfully included ‘out of the box’. The caching was simple to enable on templates and fields. The memory footprint of the Ray Dale Multimedia website was a third of that of Drupal on the same website without using addon caching plugins. Challenges The only real challenge faced was understanding that ‘pages are everything’ in ProcessWire. You build categories, taxonomy, articles, blog systems with the ‘page’ (and any fields it contains) being the basic building block for all of this. ‘Pages’ in ProcessWire can be attached to templates and injected with fields to enable the creation of literally anything conceivable. However, understanding this concept takes a little work for people used to other CMSs such as Drupal, WordPress and Joomla. However, in context - and compared to other systems - this learning curve is still fairly easy. There are so many other time savers that this learning curve becomes negligible. The other area that Ray had to understand about ProcessWire was that there aren’t any template system paradigms that exist in Drupal and WordPress. Other systems have parent and child templating systems with default parent templates that can be leveraged, however, because ProcessWire makes no assumptions on how you are going to build a project (being a true framework) you currently need to create your own template files. This is made easy by good documentation on the ProcessWire website and a decent set of ‘starter’ template files that come as part of the default install. Conclusion ProcessWire was an absolute dream to work with. Ray found it to be very stable, well thought out and hugely flexible. So much so in fact, that Ray has decided to standardise on using ProcessWire for upcoming web design projects. The flexibility and simplicity of the admin system, combined with power in frontend development that ProcessWire provides is something that Ray found to be liberating and more importantly ‘best in its class’.
    1 point
  40. Nicely said Ryan! I wonder why always people with "I only know basic HTML and CSS" come with the biggest and most complex coding PHP projects that even an experienced developer would have its adventure.
    1 point
  41. The scope of the project you mention sounds pretty broad and will be a big investment on your part regardless of what system you build it in. I think part of your decision has to come from budget. If you are testing the waters rather than dedicating your full time to this project, then I would pursue whatever path has the most components already built, even if the result is not 100% what you want. I think that means looking into what's available and built through WordPress and IPS. I especially like the IPS option in your case. Maybe it's not perfect, but it does at least get you more than half way there and has the level of integration between components that you are looking for (including ecommerce). There's no doubt that you could build this all beautifully in ProcessWire, but I wouldn't recommend such a big project being your first in any CMS or framework. Whether ProcessWire or another platform, you'd want to have some significant experience developing apps/sites before pursuing such a big project in [x] platform. Unless you've set aside a large budget or don't have a full-time job already, find the tool that gets you closest to your needs before having to get into code. Then, once you've proven the concept or made it a success, develop it exactly the way you want it in ProcessWire or a full-blown framework. But stay with us here and start learning ProcessWire in smaller chunks and on smaller projects, and before long you'll be ready to build anything you can imagine.
    1 point
  42. ... no answer. I decided to help myself and hope somebody else will profit from it. I changed the following lines (450 ff) in the module-file from: if ($this->user->avatar) { $cropped_avatar = $this->user->avatar->first()->size(150); $avatar = $cropped_avatar->url; } to: if ($this->user->avatar->first()->url) { $cropped_avatar = $this->user->avatar->first()->size(150); $avatar = $cropped_avatar->url; } Now its working. About security: After logging-in each user can reach every profile about other users via profile/info/username. I think I will make some modifications for my personal use in this line (481): if($this->user->isLoggedin() && $this->input->urlSegment1 == 'info' && $this->sanitizer->name($this->input->urlSegment2)) { I would also recommend to include a field which inquires the old password before giving the allowence to set a new one in the edit-area. Until going deeper in PW I like it more and more and can image how big the potential for the future is. kixe
    1 point
  43. Think I used modulus (?) to get the fourth item and then apply a different class to it. Or for my money, the best solution - move to Foundation - I find it much more flexible.
    1 point
  44. Hey buddy, not really had a chance to look at it in a while, will definitely check back though when I get a few minutes!
    1 point
  45. @bcartier: The ImportPagesCSV-module can't do this as is. But I tried making a tiny addition to make it support FieldtypePage (those used to make page references) and it worked amazingly well. The only change needed was to add 'FieldtypePage' to $fieldtypes array (just before init() function if you take a look at the module file), like this: protected $fieldtypes = array( 'FieldtypePageTitle', 'FieldtypeText', 'FieldtypeTextarea', 'FieldtypeInteger', 'FieldtypeFloat', 'FieldtypeEmail', 'FieldtypeURL', 'FieldtypeCheckbox', 'FieldtypeFile', 'FieldtypePage', // add this line ); After that addition it's possible to choose a Page field when connecting the fields from the CSV to the ones in the chosen template. I had pre-populated categories at the target site and used their id's in the CSV file to reference those categories. Multiple categories worked like a charm as well, just use a pipe in between id's (123|456|789). Moreover, if you've got only one category per entry to reference, then you don't even need the id's of the categories - you can use paths as well. Here's a little example: cat.csv: title one two three four entries.csv: title,categories a,/cats/four/ b,/cats/three/ c,/cats/one/ d,/cats/two/ Import cat.csv using a template for categories with (at least) title field, under a page at /cats/. Then import entries.csv using a template for entries, having a title field and a page field. This should leave you with entries that are connected to categories. I hope this gets you somewhere. @ryan: Looks like page references could be supported very easily. I just used this successfully to import ~3500 pages with category references from an old site to a new PW one. But maybe there's still something else to be done before they're fully supported?
    1 point
  46. Below, I'll write how you can move your site from Drupal to ProcessWire. It's quite simple. In Drupal you will need: - Views Module, - Views Data Export Module, - Views UI Module (integrated with Views), - Chaos tools Module - required by Views. Install these modules and switch them on. In ProcessWire you need only: - CSV Page Import Process (Import Pages from CSV). Install this module. When you are ready, you have to create a new View (select: "Create a page") in Drupal with all fields which you want to export. Then, add "Data export" subpage and make sure, that format is CSV file. It's a good idea, to use Pager when you have lot of nodes (pages). You have to setup an url to download your CSV files. When you are ready - download your data. Next step: In ProcessWire, you have to prepare a template with your fields. When that's finished, you can import your data from CSV files using "CSV Page Import". That's all. If you have any questions, write them below. I can also write complete scenario for my website (if there will be anyone interested in that).
    1 point
×
×
  • Create New...