Jump to content

doolak

Members
  • Posts

    300
  • Joined

  • Last visited

Everything posted by doolak

  1. What kind of field do I have to use if I want to sort by price? If I use a textfield, I can use commas, but it will not sort correctly. If I use an integer field, I somehow cannot use a comma... Is there somewhere an option to have the possibility to use commas in the integer field and avoid the behaviour that the value is truncated to a vaklue without comma? Or is there another possibility to sort by price like follow, without having to enter "Euro" and "Cent" seperately: 569,00 799,00 799,50 850,00 900,00
  2. Yes, I guess this should work fine - just it will not be possible to have all "parameters" as seperate field, because the already existing tables are using the first column of the table as "Label" so with "Import pages from CSV" I will have to import the data as follows: - product page - subpage with title "Name", second field empty and third field the name of the product - subpage with title "height", second field "cm" and third field "38" - etc. The tables are always structured like that, so I could have predefined fields like "weight", "height" etc. - so one would have just to choose if it's column 1, column 2, column 3 etc. during the import with "Import pages from CSV". Will this just "read" and display the Excel data or add all the data to the database? This sounds as it could do exactly what I need, but I have to dig into that stuff first and it will be maybe not easy to code this... There are a lot of different "fields" - what do you mean with "copy and paste"? Where should it been pasted?
  3. Thanks for your answer, diogo! This would be a possibility to have the tables displayed properly - but it will be a lot of data sets which has to be imtegrated, maybe 50.000 to 100.000 products, so this will too much work to include them. And I would prefer to import the data into fields, not just embed the table into the website. So it would be possible then to use that data later for other purposes. One idea which I have now in my mind is the following: 1. convert the Excel table to CSV and import with "Import pages from CSV files" each row of the table as page, which will be a subpage of the corresponding product page then 2. run a script which verifies if the product page has such subpages, and then adds the data of the subpages as fields to the product page This maybe could work, one just would have to run the script after importing the CSV - but that would be just ok I guess. What do you think about this possibility? Or do you have a better idea?
  4. Hi all, I need to display an Excel table in a page - of course it would generally be possible just to copy and paste this (seems to work fine in the actual IE) but as the behaviour how it will be imported in the Textfield (TinyMCE) will always be dependend on the behaviour of the browser etc. I would prefer to have the single datas of the table imported in seperate fields. I used "Import csv to Pages" several times for similar purposes - but in this case it would be necessary to import the data not in seperate pages but in seperate fields on one page. And, another problem is, that the excel tables are sorted like this: Does anybody have an idea how one could import such data into a page?
  5. So for repeaters dependencies could just be used via the API, not in the field settings, right?
  6. How would the syntax for verifying such a field in a repeater could look like in general? E.g. if the repeater "contentblock" has a field "contentblock_headline" I tried the following, which doesn't work: $contentblock->contentblock_headline!='' Has anybody successfully verified a field within a repeater and could tell me how to do that?
  7. The problem is as follows: There are lots of galleries, on every page there are just 12 displayed (with pagination). If someone was visiting e.g. page 4 of the paginated gallery pages and chooses one gallery to view - he should have the option to go back to the gallery overview, but to page 4 of this, not to the first page. E.g.: The visitor was on http://www.xyz.de/galerie/page3 and watched one of the shown galleries When klicking "back to the overview" he should get back to http://www.xyz.de/galerie/page3 - not to http://www.xyz.de/galerie/
  8. Hi there, I am using pagination for several templates of a site (e.g. a gallery, news). The mentioned contents are displayed in the main content area of the website - and there is a sidebar where several content boxes are shown. One of this boxes shows a limited number of pages of a specific template: $positionen = $pages->find("template=tabelle_position, limit=10"); Now I just discovered that somehow this content-box will use pagination too when displayed of one of the paginated templates mentioned above. But that box should have no pagination, but show allways the first 10 pages... Is there a possibility to deactivate pagination for such a content box?
  9. No, it is something different than numChildren. pageNum displays the current page number if you are using pagination.
  10. Hi there, as the title says I am trying to check the pageNum of a parent page - something like: $page->parent->pageNum (wich does not work) Any idea if and how one could do this? Cheers, Christian
  11. Ok, got it - and I have to say once again: "Thanks, Soma!" Here the thread and the post with the solution: http://processwire.com/talk/topic/1272-new-page-nav-in-admin/?p=11276 The important part is the setting of the moduls permisson: public static function getModuleInfo() { return array( 'title' => 'Import Tabelle als CSV', 'version' => 103, 'summary' => 'Import CSV files to create ProcessWire pages.', 'singular' => true, 'autoload' => false, 'permission' => 'page-edit' ); In this way the modul is editable by a non-superuser and can be accessed through the top navigation.
  12. Yes, you have to change the children settings for that template once to move the page, then set it back to the standard settings. And I tried a second possibility: I copied the admin template and gave that other permissions. But somehow I couldn't manage it to make the page viewable in the top navigation for a non-superuser...
  13. Yes, I know it is accessible through the "Setup" - but this part of the navigation is not allowed for a normal editor, just for a superuser. I would like to make it available for a non-superuser in the top navigation ;-)
  14. Is there a possibility to make the module available for an editor? If I move it out of the "admin" tree - it is available, but he has to click "view" to see the module. Would it be possible to leave it in the admin tree and make it visible in the top navigation for him?
  15. Hi slkwrm, yes - recognized that mistake - just found the description of the module: "Provices a page search engine for admin use." ... Searching repeater fields through the API seems to work fine here the way you described it, thanks a lot! $matches = $pages->find('myrepeater.myrepeaterfield*=$q');
  16. In fact it's a little confusing: In the module settings you can define the default fields to search and the default field names which should be displayed in the results. In the search template both parameters are defined again - do the module settings make any sense then?
  17. Hi there, I ran encountered exactly the same problem a few minutes before - now I had a look at the original search template: $matches = $pages->find("title|body|sidebar~=$q, limit=50"); Does this mean that the selectors above overwrite the module settings? Cheers, Christian
  18. I guess I found a solution to combine the code snippet for the gallery with the sorting by selectors: $images1 = $page->galerie_fotos->find('sort=filename'); $images = $images1->slice($start, $items_per_page); As far as I can see this works fine. LOL - seems to be sort of the same solution! Yours does the same in one step like mine in two steps ;-) Thanks for your help!
  19. @kongodo: Thanks for your help! Usually I am using selectors exactly in the way you described it - in this case I am not sure how to use it, because the code snippet I am using for the gallary uses this code in the relevant part: $images = $page->galerie_fotos->slice($start, $items_per_page); and I don't know if it's possible to use a selector within this code...
  20. Thanks for your answer, ryan! So if I just don't care about the order of the images in the backend and want to display them ordered on the website, how can I do this sorting within the following code: // get the images you are going to display $items_per_page = 18; $start = ($input->pageNum - 1) * $items_per_page; $total = count($page->galerie_fotos); $images = $page->galerie_fotos->slice($start, $items_per_page); // make this to give MarkupPagerNav what it needs $a = new PageArray(); // add in some generic placeholder pages foreach($images as $unused) $a->add(new Page()); // tell the PageArray some details it needs for pagination // (something that PW usually does internally, for pages it loads) $a->setTotal($total); $a->setLimit($items_per_page); $a->setStart($start); // output your images foreach ($images as $image) { echo "<div class='galerie_image'>"; echo "<a class='fancybox' rel='fancybox' href='{$image->url}' title='{$image->description}' >\n"; $thumb = $image->size(220, 150, array('upscaling' => false, 'cropping' => true)); echo "<img class='galerie_thumb' src='{$thumb->url}' alt='{$thumb->description}' />"; echo "</div>"; } echo "<div class='clear'></div>"; // output the pagination navigation echo $a->renderPager(array( 'nextItemLabel' => "»", 'previousItemLabel' => "«", )); How can I use a selector to display the images sorted by name? Cheers, Christian
  21. Hi there, is there any possibility to control the order of the images which are uploaded as a Zip archive? At the moment it seems to be rather randomly - if I have different images e.g. 001.jpg, 002.jpg, 003.jpg, they appear in a random order after they are uploaded and unzipped. Would it be possible to have them sorted by name? Cheers, Christian
  22. Thanks a lot - i will have a try.
  23. Where do I find the images manager?
  24. But if each gallery is a page and has a lot of images - it wouldn't be possible to choose one of the images, right? I would have to use a seperate page for each image.
×
×
  • Create New...