Jump to content

Manfred62

Members
  • Posts

    326
  • Joined

  • Last visited

Everything posted by Manfred62

  1. @ryan: just mentioned this in another thread. Maybe, you can include the date/timezone settings in the install process?
  2. Hi continued working on my testpage. Now created tables with the help of the repeater module. So far no problem. Got all, what I expected. Create needed fields, create repeater, include fields in repeater. Then I created a template repeater_namexx.php. My first construct was (call in page template): <?php foreach($page->namexx as $beilage) { echo $beilage->render(); } ?> my template 'repeater_namexx.php' looks like this: <?php echo "<tr><td>{$page->beilage_menu}</td>"; echo "<td>{$page->woche_menu}</td>"; echo "<td>{$page->woche_preis}</td></tr>"; ?> But what confused me: the repeater_ template ist not visible in the admín template area?? Then I worked on and changed the call in the page template: <?php foreach($page->beilagen as $beilage) { echo "<tr><td>{$beilage->beilage_menu}</td>"; echo "<td>{$beilage->woche_menu}</td>"; echo "<td>{$beilage->woche_preis}</td></tr>"; } ?> so I can call this snippet with a simple include into the page. Also I deleted the repeater_template.php. All running fine so far. But under the admin - repeaters - name... settings I can still see/choose the repeater_name.. templates? Also I always have 3 unpublished empty entrys. After deleting them, they always return to stay. Could someone explain all this behaviours? Did I mixed up something in working order? thanks in advance
  3. just an idea for site specific css: when you use the BodyClass module, you can control the css as needed. Also there's no need for multiple css files. Then you can set all styles in the same file using specificity.
  4. Manfred62

    Newsletter

    take a look here: http://processwire.com/about/news/feb-2013/
  5. Ryan, you're right. My mistake in template settings. It's all ok so far. Thank you for v e r y fast reply!
  6. update is no problem (2.2.9 -> 2.2.13 -> 2.2.15). But is there a bug? Now I'm missing the 'new' button for creating pages in the 3. level. home - page -- subpage // missing 'new' button --- subsubpage --- subsubpage Tested with standard and Teflon theme. See screenshot:
  7. just another tip: normally you don't need the class="dropdown-menu". This can be done with simple css. #css3-menu ul {all the styles of dropdown-menu;}
  8. do this not work? 'inner_tpl' => '<ul class="dropdown-menu">||</ul>',
  9. Ryan's sitemap file is a good example of one way to do it. If you use the module, there will be some more flexibility I think. At first try it without the options, to see if it will show the complete tree (attention: without css style, because missing classes). $treeMenu = $modules->get("MarkupSimpleNavigation"); echo $treeMenu->render(); now you have to use the options, to config/style your menu. 'has_children_class' => 'dropdown', 'outer_tpl' => '<ul class="blue nav" id="css3-menu">||</ul>', 'inner_tpl' => '<ul class="dropdown-menu">||</ul>', these are some options you need, maybe more... To get the first link style, I think you have to do this with css. Maybe .dropdown + a (styling of dropdown-toggle) <a class="dropdown-toggle_" data-toggle="dropdown".. the rest depends on your css. EDIT: my first example is only something, I used on a test site of mine. Only to show you the options of this awesome module.
  10. Hi luzox, not sure where's the problem? You can e.g. use the Markup Simple Navigation module. There you have a lot of config options. Create a navigation.inc (simple example of a site I build). Take a look at the docs of the module for the options. <?php $treeMenu = $modules->get("MarkupSimpleNavigation"); // load the module $options = array( 'current_class' => '', // string (default 'current') overwrite current class 'max_levels' => 1, // int (default null) set the max level rendered 'outer_tpl' => '<ul id="navi">||</ul>', // template string for the outer most wrapper. || will contain entries 'item_current_tpl' => '<strong>{title}</strong>' // template string for the current active inner items ); echo $treeMenu->render($options); // render menu ?> Then put something like this in the place, where you need your navigation to be: <?php include("./navigation.inc"); ?> Make a first try without options, to see what the modules output looks like. Then fine tune your options.
  11. Ryan, thanks for the infos. I've taken the ID solution. Playing around with a local testpage. Still have to learn a lot...
  12. just a thought about install routine: what about a select option for the date/timezone? In the moment you have to change it manually in the /site/config.php
  13. sounds like the same I got, when trying to install PW with 'ProcessWire Blank Profile'. This was fixed in the newest dev version.
  14. thanks diogo/soma hmm ok, I missed the ->url <a href="<?= $pages->get('/disclaimer/')->url ?>">Disclaimer</a> think, PW could get more fresh users with better helpful documentations in practical context.
  15. simple question: how to link to a side, which is not shown in the navigation, but in footer. Page 'disclaimer' is in the tree under root, is hidden, but published. Normally I woud do it this way: <a href="../disclaimer">Disclaimer</a> but under the home (root) the url points one step higher. Didn't found any tutorial, cheatsheets are a big collection of developer/guru speaking, search in forum not helpful.. Is that so difficult??
  16. uups, need new glasses or learn to count from 1 to 2.. thanks soma, now it's working like expected. Checked it also with unpublish februar, then we get the 'no menus' message. Puuuh, now I can keep on learning PW
  17. no 2. EDIT: without parent= it shows the content. Seems logical, because we already have the parent /empfehlungen/ in the string? $menues = $pages->get("/empfehlungen/$curr_month")->children("template=empfehlung_list");
  18. hi diogo, thanks for your patience. Now tested this with [2]. No success
  19. thanks for replying, but... no sucess. Tried this snippet: <?php $month = date("F"); // month integer $month_names = array("januar","februar","maerz","april","mai","juni","juli","august","september","oktober","november","dezember"); $curr_month = $month_names[$month-1]; $menues = $pages->get("parent=/empfehlungen/$curr_month")->children("template=empfehlung_list"); if(count($menues)){ foreach($menues as $child){ echo $child->render(); } } else { echo "Keine Menues gefunden."; } ?> beside the missing bracket in if(count($menues)) it gives me the same output like my solution above by chance. Can not reproduce how this works. Think, if I publish only one month --> this content will be shown. changed F to n (because of counting the months, like diogo mentioned) gives me the "no menus found" message. Are there any constraints, to get the snippet above to work? I have all 12 months under /empfehlungen/, in the correct order, named like in the array uncapitalized. Any more to check about? thanks
  20. explanation of the site: a small restaurant. There's a page 'recommendations'. Here you find some special menus, based on a monthly turn. Example: in July italian cooking, in September some chinese menus etc. So there's no need for sorting by year. The editor can work on the 'month' pages. In my solution, the editor publish only the needed month-page. just tried the other code in this way, but no output. Month names must be english (February instead of Februar)? Also tested, no sucess. Hmm, what's the problem here? <?php $this_month = strtolower (date("F")); foreach($pages->get('parent=/empfehlungen/ name=$this_month')->children->find('template=empfehlung_list') as $child){ echo $child->render(); }; ?>
  21. now I got it. A little bit old style. Maybe there's a shorter way. Now only one month (published) will be shown. That's the wanted effect in this example. But for understanding: if all months are published, the array renders always the last found (published) name. Correct? <?php $januar = $pages->get('/empfehlungen/januar/'); $februar = $pages->get('/empfehlungen/februar/'); $maerz = $pages->get('/empfehlungen/maerz/'); $april = $pages->get('/empfehlungen/april/'); $mai = $pages->get('/empfehlungen/mai/'); $juni = $pages->get('/empfehlungen/juni/'); $juli = $pages->get('/empfehlungen/juli/'); $august = $pages->get('/empfehlungen/august/'); $september = $pages->get('/empfehlungen/september/'); $oktober = $pages->get('/empfehlungen/oktober/'); $november = $pages->get('/empfehlungen/november/'); $dezember = $pages->get('/empfehlungen/dezember/'); foreach($pages->get('name=januar|februar|maerz|april|mai|juni|juli|august|september|oktober|november|dezember')->children->find('template=empfehlung_list') as $child){ echo $child->render(); };?> @diogo thanks for help. But confusing.. why use another hierarchy level (year)? Also tried it with the first example. But how to find the first level (/empfehlungen/) before specifing the month with $this_month = strtolower (date("F")); Also corrected this typo: 'name=$this_month'.
  22. Hi Diogo, thanks for help. The structure is like you described it. I also got it running with the exact path, but this is not flexible to use. <?php foreach($pages->get('/empfehlungen/juli/')->children->find('template=empfehlung_list') as $child){ echo $child->render(); };?> Tried your solution, but no success (e.g. no understanding..). <?php $this_month = strtolower (date("F")); foreach($page->get('name=$this_month')->children->find('template=empfehlung_list') as $child){ echo $child->render(); };?> Maybe there will be another problem (even when this runs): month names in german. Had read something about this in the forum. On monthly base is enough. Hmm, not sure if PW is the right thing for me. I'm no php developer. Coming from MODX and in the moment it feels, like I can do this page in shorter time with MODX. Will take a break for coffee, to get my head clear. Thanks.
  23. hi to all just making my first steps with ProcessWire and porting a static website to PW (locally on xampp). But now I'm stucked with a hierarchy problem (limited php knowledge..). I have a parent side (Menu recommendations) with children (various menus of the month). parent template: <?php include("./head.inc"); ?> <ul id="empfehlung"> <?php foreach($page->children->find('template=empfehlung_list') as $child){ echo $child->render(); };?> </ul> <?php include("./foot.inc"); ?> list items: <li><?php echo $page->title; ?></li> that's working and really simple. But now I want to expand the structure with months. So the user can prepare the menus and only publish the needed 'month'. I don't know how to get this done correctly. How can I fetch the published month and render the content? Will publish/unpublish like said above work despite of published children-pages? Also a nice to have: time scheduling (publish) of the months. Possible? thanks in advance Manfred
×
×
  • Create New...