Jump to content

kongondo

PW-Moderators
  • Posts

    7,529
  • Joined

  • Last visited

  • Days Won

    160

Everything posted by kongondo

  1. @Sephiroth, you are in control of the template (files) . Could your question be a bit more specific? If you are referring to the optional demo content - those are just that; demos...
  2. Was just about to post that . Learn't about it when PW switched from TinyMCE to CKEditor in core (the big red error notice with links)...
  3. @Danjuan09, I am in a bit of a rush but wanted to say welcome to PW and the forums! I understand moving into a new 'house' can sometimes be confusing because things may not be how/where you expect them to be .. Others will explain better (or I will later) but PW does not really have (frontend) themes in the sense that WP and other systems have. In PW, any HTML can be your frontend 'theme' although we really refer to them as template files. Being a very flexible system, this is usually up to the developer to implement as they wish. However, to help get some people started, a few developers here and the PW install offer what are called site profiles. These are more than a collection of template files to output frontend demo content but also include fields, template and pages to get you started rapidly. Some people use them others don't and instead install PW with the blank profile. As for the backend, there are admin themes which can be installed (since PW 2.4? I believe) as modules. Before that, there were other ways of changing the admin theme. Not all 'older' admin themes listed in the modules directory have been updated to be installable as modules (in fact probably none of them has!). To help you get the best of PW, I'd suggest to first go through the basic tutorials found in the links below. I'd suggest not to worry about 'themes' at the moment until you get the basics of how the system works. It will require, in some cases, some 'unlearning' on your part about how other systems you've previously used worked . So, get to know your new house first...changing the paint and decor will naturally fall into place later . Wish you a nice stay here! Start here: http://processwire.com/docs/tutorials/simple-website-tutorials/ Or here: http://processwire.com/docs/tutorials/hello-worlds/ Then here: http://processwire.com/docs/tutorials/but-what-if-i-dont-know-how-to-code/ Feel free to ask for clarity....
  4. Yes we do...OR-groups Both of these work for me (not sure if the second one is the better syntax though for this particular case): $test = $pages->find('template=basic-page, foo=(external_status=""), foo=(external_status!=accepted), sort=title'); $test = $pages->find('template=basic-page, (external_status=""), (external_status!=accepted), sort=title'); https://processwire.com/talk/topic/3768-processwire-dev-branch/?p=64049 Related new(ish) selector, selector grouping https://processwire.com/talk/topic/3768-processwire-dev-branch/?p=58722
  5. @mrkhan, Just want to clarify that you can pass a PageArray to MarkupSimpleNavigation as explained here: https://github.com/somatonic/MarkupSimpleNavigation#build-a-menu-using-a-pagearray-instead-of-a-single-root-page You are also not limited to a single menu per page. But feel free to use what works for you and you are comfortable with If you haven't already, also have a look at the PW docs here: Selectors: http://processwire.com/api/selectors/ Page: http://processwire.com/api/variables/page/ Pages: http://processwire.com/api/variables/pages/
  6. kongondo

    Muesli Café

    Any spike in donations after the TV interview?
  7. Cool. I suppose you also know about MarkupSimpleNavigation?
  8. @mrkhan, If by child pages you are referring to the children of the pages you have selected in your menu_page page field, then the following (slightly verbose) code should do it. This will create a 2-level menu. For anything deeper use a recursive function - there's plenty right here in the forums. $out = ''; $out .= '<ul>'; foreach($page->menu_page as $item) { $out .= '<li class="top"><a href="#">'. $item->title . '</a>'; if ($item->numChildren) { $out .='<ul>'; foreach ($item->children as $child) { $out .= '<li class="child"><a href="#">'. $child->title . '</a></li>'; } $out .='</ul>'; }//end if child items $out .='</li>'; } $out .='</ul>'; echo $out;
  9. Hi...just a quick one to let you know that I have this working...rows and columns grow with each new row and column pages or shrink when these are deleted/trashed/hidden/unpublished. I need to do a couple more tests and cleanup the code (remove hard-coded stuff, rename the db table columns to something more generic, e.g. matrix_row and matrix_column, etc) . I also want to make the Fieldtype more configurable - e.g. ability to use a PW selector to find pages to populate rows and column headers (x and y axes). However, not sure if the Fieldtype duplicates what is already available in PageTable? Anyway, here's some screens.. matrix (InputfieldMatrix) db table (FieldtypeMatrix)
  10. This module Fieldtype Image Extra (multi-language) should be able to handle that I should think: http://mods.pw/82 Support: https://processwire.com/talk/topic/7910-module-fieldtype-image-extra-multi-language/
  11. You can add as many pages as you want. Try it. There is no limit. I was just using 4 as an example... . You can order them the way you want. Depending on how you setup the menu_page field under Input Tab -> Selectable Pages, you can limit the pages that are selectable as menu items. By limit here I mean you could limit them to child pages of a particular parent, or pages using a particular template, etc (I don't mean a limit on numbers!)
  12. Sure, I can and I have tested this and it works but let me show you how to do it without repeaters (it's just an unnecessary step in this case IMO)...assuming you want a single level menu. This is for a single level menu Edit and change your page field (menu_page) to be a Multiple pages (PageArray) While still editing it, on the Input Tab, scroll down to Input field type * and select an appropriate input, maybe *AsmSelect. Save Add menu_page to your top-menu template Edit the page 'top-menu' and select your menu pages Output your menu using code similar to below (add code to top-menu.php)..or adjust it if adding to your head.inc (i.e use $pages->get to get the Top Menu page first) foreach($page->menu_page as $item) echo '<li class=""><a href="#">'. $item->title . '</a></li>'; Screenshot
  13. Can you confirm if your page fields are for single or multiple pages? If multiple and if you have set up as shown in the screenshot below, then you need to nest yet another foreach! If you really want to continue using repeaters for this then you probably want to write a recursive function to output your menu. Is this your setup? If yes, you would need to loop through $menu_item as well...
  14. I don't understand this. It doesn't stop you from using a page field directly in your page rather than via a repeater...anyway... I am not very good with the alternative PHP syntax you are using so not sure if your <li> is in the right foreach. Is this a development/local server you are testing this on? Turn on debug mode to true if you haven't already. OK, let's determine that $menu_page is actually an array. What do you get when you do the following? foreach($top_menu->menu_pages as $menu_page) { echo gettype($menu_page); exit; }
  15. Mrkhan...welcome to the forums and PW... I am wondering why do you need repeaters for this? You only have for pages in them and you are not exactly 'repeating' anything...You can simply have a multiple page field added directly to your page (the one using the top-menu template) and select your menu pages directly rather than going through repeaters...OK, back to your question... Whereas you are looping through your repeater (it returns an array), you still have one more array to loop through - your page field is a multiple page field. So you need to foreach it inside your repeater foreach...Also, you still have $menu_page->tile that Adrian pointed to...
  16. OK, will TRY post a prototype here soon...
  17. @Gazley. None whatsoever from the point of view of upgrading Blog. Upgrades don't overwrite anything outside /site/modules/ProcessBlog/. Nothing is reinstalled, your content, fields, etc are not affected. You could even rename your Blog pages and it will still work fine. Only two don't dos: don't change the IDs of the main Blog pages in the db and don't rename Blog fields and templates
  18. OK, then your table illustration is a bit confusing. Do you mean you want to store the values of both pagefield-A and pagefield-B in one inputfield? E.g. store x,y in the inputfield? Or do you want to store them separately e.g. pages_id | x (pageField-A values)| y (pageField-B values) 5022 | 4 | 8 5038 | 7 | 10 5045 | 15 | 12 If that is the case, it might actually be less work to start from Soma's FieldtypeDimension - https://processwire.com/talk/topic/4081-fieldtypedimension/. I have a feeling though that I am not getting you correctly and I might be mixing up what you want to be visible in the Inputfield vs the structure of the database table for this Fieldtype
  19. Could you show us the code you tried with FieldtypeEvents? Do you also want the first column and header rows (pageField-A-valx and pageField-B-valx) to be visible in the inputfield or just the calculated values? Maybe first solve this (if you can ) outside the Fieldtype then try and implement it in FieldtypeEvents. What sort of calculations are you carrying out by the way, i.e. y * x?
  20. Writing quickly but these should point you in the right direction...to implement in your code above // retrieve all images with tag 'potrait' $images = $page->images->findTag('potrait'); you can then iterate $images. If in a selector, then search using the subfield tags: // Find pages containing an image with the single (1) tag: 'potrait' // This will only match images with 1 single tag of 'potrait'. $mypages = $pages->find("images.tags=potrait"); http://processwire.com/api/fieldtypes/images/ Btw, just wondering why your tags have to be manually entered in some field? Why not use the child pages themselves as tags? Then you can use pagefields to pull in those tags? E.g. a child paged titled 'potrait'
  21. For security reasons, you can't directly access files like that within the the PW templates directory (as well as others). Hmm...I always thought it's only PHP files that this restriction applies to but possibly HTML files as well? Somebody more knowledgeable will clarify Possible workarounds if restriction also applies to HTML files: use an include in a template file place the file outside PW directories and reference it from those locations
  22. @ESRCH...welcome to the forums. Read you question quickly. Maybe this topic can help? https://processwire.com/talk/topic/5441-kind-of-calculated-field/ It's about creating a hidden field to store a calculated value on the fly. See posts #2 and 3
  23. ...yes, and it's faster than count() https://processwire.com/talk/topic/3094-get-first-image-and-title-of-children-pages/?p=30470 https://processwire.com/talk/topic/3094-get-first-image-and-title-of-children-pages/?p=30608
  24. @Jan....minus the urlSegments bit, that's exactly one of the answers I provided in my post above (#2)...which @Manol didn't consider as the solution
  25. I'd say we don't. Maybe @kixie can collaborate with @geniestreiche to enhance the existing module(s)? Whilst I wouldn't want to discourage the enthusiasm of budding module developers, I'd say this is something we need to carefully consider and strike a good balance about. There's enough lessons from our neighbours Drumlapress about this . Just saying..
×
×
  • Create New...