Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Community Answers

  1. totoff's post in Zurb Foundation - problem with topbar-navigation was marked as the answer   
    <nav class="top-bar" data-topbar> <section class="top-bar-section"> <ul class="right"> <li class="divider"></li> <?php $treeMenu = $modules->get("MarkupSimpleNavigation"); // load the module $options = array( 'has_children_class' => 'has-dropdown' ); echo $treeMenu->render($options); // render default menu ?> </li> </ul> </section> </nav> The pattern is very easy. The above example will attach the class "has-dropdown" to every list item that has a submenu. Try to understand the Readme by comparing it to my example and you will understand quickly.
    Edit: Misspelling corrected
  2. totoff's post in processwire constant logout was marked as the answer   
    Yepp, could be worth checking. But - as I said - I'm not an expert myself.
  3. totoff's post in Question regarding Blog template was marked as the answer   
    Hi Kongondo,
    many thanks for your replies! This code in blog-list.php does the trick:
    $posts = $pages->find('template=blog-post, limit=10');//or whatever the template of a 'post' is $start = $posts->getStart()+1; $end = $start + count($posts)-1; $total = $posts->getTotal(); if($total) $sidebar = "<h3>" . sprintf(__('Posts %1$d to %2$d of %3$d'), $start, $end, $total) . "</h3>"; However, I'm not yet sure if it will play nice with the pagination this way, but I will test with more dummy content. Do you think it is safe to remove the limit=10 considering site performance?
    Not sure if this is a misunderstanding. /markup/posts.php is required to render the markup for both, the post list and the single posts itself. You can't remove it from the function. Did you mean /posts.php/. From there it's safe to remove the code and I've already done it in order not to have the counts headline twice
    Again, many thanks for your support. Much appreciated.
  4. totoff's post in Links In Admin Point To Outdated Url was marked as the answer   
    Sorry folks, I got it sorted by removing dev.mysite.com from $config->httpHosts in config.php
    Sorry for posting too quick.
  5. totoff's post in 1und1 starter support was marked as the answer   
    It has PHP and one SQL DB. Chances are good. But the offer is very poor compared to other hosting companies. If you don't need 1&1 for a particular reason better check out other offers.
  6. totoff's post in Pages vs Repeater? was marked as the answer   
    let's say you have the following structure:
    - mypage
    -- post 1
    -- post 2
    -- post 3 etc.
    a post consists of a title and a text (to keep it simple). your goal is to display all content (title and text) from the posts on "mypage". that's pretty easy:
    1. make a template "post" (it doesn't need to have a template file. it's just for holding the fields) with a title and a text field. assign it to your post pages and fill with content.
    2. make a template "my page". assign it to mypage. from this template you loop over the child pages ("post") and retrieve their content. for example:
    <?php foreach($page->children as $post) echo "<h1>{$post->title>}<h1>"; echo "<p>{$post->text>}<p>"; ?> that should to the trick.
    EDIT: adrian was quicker. And sorry for the formatting of the code (which is not tested).
  • Create New...