Jump to content

mr-fan

Members
  • Posts

    848
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by mr-fan

  1. So my errors show me that i've forgot one brace and set one wrong var name...and changed the condition to check the class on current... so this have to work as expected. Have you debug mode on in config.php? Get you PHP errors? Here is the right example: // top navigation consists of homepage and its visible children $homepage = $pages->get('/'); $children = $homepage->children(); // make 'home' the first item in the navigation $children->prepend($homepage); $count_children = 0; // render an <li> for each top navigation item foreach($children as $child) { //change the css class if child is current $class= ($child === $page->rootParent) ? " current " : ""; //count entries $count_children++; //check if we got the second/third or something else item if ($count_children == 1) { //counting starts by 0 so second item is 1! echo custom link echo '<li class="'.$class.'"><a href="'.$homepage->url.'#screen2">My custom title</a></li>'; } else { //normal menu entries echo '<li class="'.$class.'"><a href="'.$child->url.'">'.$child->title.'</a></li>';} } best regards mr-fan
  2. Didn't work is a not acceptable answer....;-) What did not work? Error message? Should work.. I will try tomorrow a real world example. Just short from mobile.
  3. <?php // top navigation consists of homepage and its visible children $homepage = $pages->get('/'); $children = $homepage->children(); // make 'home' the first item in the navigation $children->prepend($homepage); $count_children = 0; // render an <li> for each top navigation item foreach($children as $child) { //change the css class if child is current $class= ($count_children == 0) ? " current " : ""; //count entries $count_children++; //check if we got the second/third or something else item if ($count_entries == 1) //counting starts by 0 so second item is 1! echo custom link echo "<li class='$class'><a href='#screen2'>My custom title</a></li>"; } else { echo "<li class='$class'><a href='$child->url'>$child->title</a></li>";} } ?> just written in the browser - may need some testing...use counting items to add some items between. Changed the usage of the current/active class to some easier function to make it a little more DRY... regards mr-fan
  4. You at the wrong place. explanation see line: https://github.com/NicoKnoll/MarkupSEO/blob/master/MarkupSEO.module#L417 you've changed the fieldname in the module settings page. change the <meta> tag itself could be done in this line: https://github.com/NicoKnoll/MarkupSEO/blob/master/MarkupSEO.module#L340 for real dublin core metas this module should get an option for this with a checkbox - to add the DC. tag to every meta tag and add additional tag like content type or created date.... could be done with a checkbox in the settings and an additional if statement to get those DC.tags. May Nico find some time, if i've got more time on my hands i would proud to contribute to this awesome module...but my calendar says Best regards mr-fan
  5. No ad - just the truth You know that on the import/export topic i was involved in testing - BCE works much better than CSV-Export or Lister-Export. (I'm little behindhand with my german translation for the dev... ..summertime is always a appointment mess)
  6. If you wanna keep us informed about this topic would be nice. Since i've a old website that until now run with my former CMS - and at the day i will setup all new with PW i will need a kind of multiple choice module or application, too. Best wishes for your project, mr-fan
  7. For listing pages or subpages, import, export and editing stuff https://processwire.com/talk/topic/6102-batch-child-editor/ is a very heavy tool that is released as opensource...as an little alternative. But i agree i install Lister Pro on every Page and have a very easy setup of listing things for my users...but i've no problem if it stays comecial....since i love to support my CMS/CMF of choice and his developer ryan with this small contribution. I know you wrote the same - but it shouldn't integrate in the core - since PW is more intended as a (very powerful) toolbox than a ready to use CMS. So buy Lister Pro is like spending the development some money AND get two things for that contribution 1) good feeling 2) really good module best regards with good feelings mr-fan
  8. A other software on this topic even with an API (connect PW Users) is this one: http://savsoftquiz.com/ regards mr-fan
  9. With Soma's workaround or better option on save it works perfect. For the strange behaviour that only prev/next is affected i've created a issue on gh: https://github.com/ryancramerdesign/ProcessWire/issues/1359 regards mr-fan
  10. hmm just voting for this one - it would be a very nice concept and fits what your're thinking: https://processwire.com/talk/topic/9986-image-field-ui-and-general-tidy-up/ regards mr-fan
  11. May usefull may not. In my former CMS i used a kind of Multiple Choice addon that works very good on this task. (The dev is sadly deceased last year.) May the used classes on this topic could help you. https://github.com/phpManufaktur/dbMultipleChoice regards mr-fan
  12. Crosslink with solution in other threat.....just for connecting things right. https://processwire.com/talk/topic/10731-how-to-debug-page-prev-page-next-no-output-given/#entry101066 regards mr-fan
  13. Thank you Soma for the lession.. works like it should. So the last question on this is - is it a bug or is it a feature? But at the end with this option it is solved. But if this behaviour is correct it should documented somewhere? I found the option "quiet => true" in the forum but "uncacheAll" not until now. Thank you again for this insight. Regards mr-fan
  14. So next step of getting the answer.... it seems that if i save the ad view counting i create the problem...but i don't know if this is a maybe a bug? $anzeige->of(false); $anzeige->anzeige_views += 1; $anzeige->save(array("quiet" => true)); $anzeige->of(true); If i run without this saving all works the ads are there and the $page->prev $page->next is not empty.....if i save the counterfield...prev and next is empty? So finally i worked it out - last question stays - Is this a bug or a issue on my code? Best regards mr-fan
  15. I could track down the issue but i didn't know why this happens...too less skill: i ripped off all modules, admin.php hooks and content on the specific template and get the problem nailed to this function that output links of some ads so CAN ANYBODY tell me my mistake and WHY this little function clears $page->prev $page->next? /** * Show Ads in several templates * * $limit - Integer - set the limit of displayed ads ->look at anzeige_anzahl /settings/werbeanzeigen/ * */ function renderAdsystem($limit = 2) { //get all ad pages on template choice - unpublished pages are not listed.... $limit = wire('pages')->get('1073')->anzeige_anzahl; $anzeigen = wire('pages')->find("template=part_ad, limit={$limit}, sort=random"); //render ads and collect them in $all_adds $all_ads = ""; foreach ($anzeigen as $anzeige) { $anzeige->of(false); $anzeige->anzeige_views += 1; $anzeige->save(array("quiet" => true)); $anzeige->of(true); //get the right imagesize $anzeige_bild = $anzeige->bild->size(260,120); //build ad link $all_ads .= '<a href="'.$anzeige->url.'" alt="'.$anzeige->title.'"><img src="'.$anzeige_bild->url.'" alt="'.$anzeige->title.'"></a>'; } return $all_ads; } I have to switch the rendering of the ads so it should work!... best regards mr-fan
  16. @Mikel seems i've in the same trouble like you - did you get the problem solved?
  17. Ahh seems i've the same problem like here: https://processwire.com/talk/topic/10487-dependencies-for-page-prev-page-next-methods/
  18. Tested the same setup/site profile in a stable 2.6.1 and $page->prev and $page->next are empty again.... Could this be a strange setting or a bug? What the heck could supress the prev / next page?? On all normal pages it works only in this article pages i don't get it - is there may a problem within the template settings or the parent page template? I'm kinda stumped!
  19. So i'm a little confused now. this $page->prev and next thing i've used several times...but now i'm stucked. Did some poor debugging like: echo '<p> List: '.$page->siblings().'</p>'; echo '<p> Prevout: '.$page->prev.'</p>'; echo '<p> Nextout: '.$page->next.'</p>'; result is: List: 1092|1089|1087|1069 Prevout: Nextout: Setup are normal contentpages (articles) and there are 4 pages...i don't no why $page->prev is empty? No i'm not at the last or first page...working with 2.6.13 dev regards mr-fan
  20. Ok i', little silly on my english labels...thanks for that... created a new normal image field on this and it looks the same...
  21. Just found that with 2.6.13 dev the image preview is broken...see https://github.com/ryancramerdesign/ProcessWire/issues/1353 can anybody confirm this? Another question - wich isn't much a problem for me but if you upload a image in a pagetable page imagefield - i first get the image preview if i save the pagetable page? Using PageTableExented module, too. regards mr-fan
  22. This module is so amazing great! There is no task of navigation that can't go throw this nice piece of code.... Sorry for this idle post - but i think complimenting is important, too Jus finished my first MarkupSimpleNavigation with the use of the build in hooks to get a MegaMenu working fine...take me only some minutes until i found this gist: https://gist.github.com/somatonic/6258081 Thank you very much Soma i love it!
  23. You are a real bad guy....with all this "stream updates" just one tick while testing... https://github.com/adrianbj/BatchChildEditor/pull/4 (changes the labels on the field selection in the right language) The issue with Lister view if there was images is a problem of the actuale PW dev i think? For BCE i tested today very much and the next days german translation follows....while testing i've to say just one thing but i think i'm repeating me: THIS IS A SUPER MEGA GREAT ADDON.... some little testing things: - Setting (Editor,Position, Load...) ->Position = Inline Fieldset, Insert After = title, load the fieldset open = true, ....Open Method is hidden if loading the fieldset collapsed but "Normal" or "Ajax" loading should be selectable while this setting enables the inline editing, too not only the loading? - A "modal option" for lister mode should be a little additional option for the lister edit links, to edit childpages in modal mode... This is really great if your wanna a easy and nice overview page on such root pages for the same kind of content like team, tags and articles or similar....i'll embed it in my current projects since it is much more flexible that a pagetable for this task! And a additional call for others to buy Lister Pro... Best regards mr-fan
  24. seems i've to translate some strings again....you're really getting this as alternative editing interface for childpages instead of the normal pagetree.... Thank you very much for this nice piece of work - will testing soon.
×
×
  • Create New...