Jump to content

kazu

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by kazu

  1. I do a new Installation (PHP 5.4.45, PW 2.7.2, Template Editor 1.6.0). Now I get that message when I use the Template Editor: Permission denied to open this file. Please give the file "filename" write permissions. The template permissions after my installation are 644. 664 does not work, 666 does work. Because of security: Can I leave the files with 666 on the server, is it safe?
  2. When I use the Template Editor I get that message back: Filename Be careful with this. If you're changing the file name you probably have to change the template's name manually, too. Preview <p>Preview doesn't support "" media type. The template would not be displayed. The error message does not reveal what's the problem. Mmhhh ... Media Type seems to be the problem. Can I add myself MediaTypes, so that I can edit this?
  3. Wow, I see, there are many many possibilities. Because I just start to learn, I'll start with the easiest way, and perhaps it is then also the right ;-) Thank you for your tips to all of you!
  4. Is it possible to create content block/s, which can be called up via echo (or in another way) in a page, or template? <?php echo $name-of-content-block; ?> It often happens that I have in pages recurring static objects, which must not be edited by the page editor. I've done it in the past so, that I create a content block, which I call up in a page, or in the sidebar at any position. This could for example be a block with opening times, which must not be permanently changed.
  5. Therefore it will not help for adapting a single Tab. But, the single entry (description) <meta name="description" is defined somewhere. Exist to the module additional files, which may not be in the module directory? Somewhere, the entry must be ...
  6. If I change $rendered .= '<meta name="'.$name.'" content="'.$content.'">'.PHP_EOL; also other tags will be affected, for example keywords and others?
  7. Where I could find the echos in the module? For example if I want to change a meta tag name, maybe for example from <meta name="description" to <meta name="DC.description" ? When I change $field->name = "description"; in line 574 nothing happens. I would not really change anything - regardless of it, would it be possible? The module has no custom template, right?
  8. @Roope The menu works fine from post #6. Sorry, but I don't know what's a "recursive version"? Therefore, I use the version I have. Thanks for your support!
  9. @Roope I have inserted your code, it works fine. Thanks to the links I was able to add also the title <ul class='topnav'> <?php // top navigation consists of homepage and its visible children foreach($homepage->and($homepage->children) as $item) { // class name for item wrapper $class = $item->id == $page->rootParent->id ? 'current ' : ''; if($item->hasChildren()) $class .= 'parent '; // open item wrapper if(!empty($class)) { echo "<li class='". rtrim($class) ."'>"; } else { echo "<li>"; } // item link element echo "<a title='{$page->parent->title}' href='$item->url'>$item->title</a>"; // markup for possible childs if($item->hasChildren()) { echo "<ul>"; foreach($item->children as $child) { if($child->id == $page->id) { echo "<li class='current'>"; } else { echo "<li>"; } echo "<a title='{$child->title}' href='$child->url'>$child->title</a></li>"; } echo "</ul>"; } // close item wrapper echo "</li>"; } ?> </ul> @EvanFreyer In my site it does not work, thanks anyway.
  10. That does work fine, thanks Roope! I'm trying now to integrate the current status into the childs menu. I have not figured out why the menu knows which page is currently active? I think that probably one if or else is necessary, so that not all pages get the current status? For me a good deal to learn. Once again, thanks for your help!
  11. I'm just working on my first ProcessWire project. Unfortunately I am not so talented in the PHP programming, so I have a question about the menu code. In my template it’s just included so: <nav class="row main-navigation"> <ul class='topnav'> <?php // top navigation consists of homepage and its visible children foreach($homepage->and($homepage->children) as $item) { if($item->id == $page->rootParent->id) { echo "<li class='current'>"; } else { echo "<li>"; } echo "<a href='$item->url'>$item->title</a></li>"; } // output an "Edit" link if this page happens to be editable by the current user if($page->editable()) echo "<li class='edit'><a href='$page->editUrl'>" . __('Edit') . "</a></li>"; ?> </ul> </nav> The main menu is displayed, the submenu does not work: <ul class="topnav"> <li class="current"> <a href="/about/">About</a> </li> There are two child sites, and I would like that it is appears like that: <li class="parent">submenu <ul> <li> <a href="/about/child/">submenu item 1</a> </li> <li> </ul> </li> Currently, the submenu will be displayed in the Sidebar. How do I get it in the main menu?
×
×
  • Create New...