Jump to content

neophron

Members
  • Posts

    182
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by neophron

  1. Hi, ah, ok, now I'm getting it. About the download link: I created a field (type: files). The frontend shows me this: <a href="&lt;br /&gt;&#10;&lt;b&gt;Notice&lt;/b&gt;: Trying to get property of non-object in &lt;b&gt;/var/www/web27428586/html/processwire/site/assets/cache/FileCompiler/site/templates/publications.php&lt;/b&gt; on line &lt;b&gt;18&lt;/b&gt;&lt;br /&gt;&#10;">Download</a> I found this article: https://jensmartsch.de/blog/simple-file-downloads-with-processwire/ I'll try it tomorrow. Thanks, I'll do this
  2. Hi, thanks for your suggestions. I solved it. The problems was, that I created this new folder in a different way (with Transmit [a ftp tool for Mac] and a mounted ftp folder). And it could be an issue with the ownership rights.
  3. Hi, I have an issue with a css file. In my templates folder is an »assets« folder with different subfolders like css, js and img. I uploaded the latest uikit3 css and js stuff to: assets --> uikit --> css and js. In my template I'm calling them like this: <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates?>assets/uikit/css/uikit.min.css" /> This gives me an 403 error: GET http://mysite.com/site/templates/assets/uikit/css/uikit.min.css 403 (Forbidden) If I change the path to: <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates?>assets/css/uikit.min.css" /> everything is fine. Is this a logic behavior from Processwire?
  4. Hola elabx, thanks for your advice. After some debugging, this code finally works: <?php foreach($page->children() as $subpage): ?> <h2><?php echo $subpage->publication_year ?></h2> <?php foreach($subpage->Repeater_publication as $publication): ?> <p><?php echo $publication->repeater_description ?></p> <a href="<?php $publication->repeater_download->url ?>">Download</a> <?php endforeach; ?> <?php endforeach; ?> My next goal is to create a real download link for pdf or doc files. And the link must be visible, if it's populated. What I could't understand is, after creating such a template.php, do I have to tell Processwire somewhere, that this template exists?
  5. Hi, I'm trying to build a publication page, where the lists of publications are structured like this: 1997 more Publications 1996 Another Publication Another Publication 01 1995 Publication 01 There is a page – »Publications« with subpages. All subpages from »Publications« exists only as content holders. They're not preview-able. Now, I created a template »publication« with a field for the year and a repeater field (»Repeater_publication«). The repeater contains two fields: »repeater_description« and »repeater_download_file«. What I'm trying is to echo the whole stuff on the Publications page with a double foreach. My question is: Is this the right approach? Shall I generate for the publication subpages a template.php? I tried this, but it doesn't work: foreach($page->children() as $subpage): $publications = $subpage->publication_year(); foreach($publications as $publication): echo $publication->Repeater_publication(); endforeach; endforeach;
  6. Hi psy and pideluxe, thanks for your responses. I took the first solution. Processwire is cool for learning php. thanks P.S. For all php newbies: http://php.net/manual/en/language.operators.php
  7. Hi, I want to show only on the start page a div with some content. I'm trying with my rudimentary php skills to construct this: <?php if($page->isHomePage()): ?> <div class="xx"> lorem ipsum </div> <?php else: ?> <?php endif ?> Ok, I know that isHomePage will give me an error. But, is there a methods how to detect the start page and then to echo a div? I thought about <?php if($page->is($home)): ?> where »home« is the template and the start page is connected with it. I'm using the older templating method. What would you recommend? Thank you
  8. Hi guys, thanks. I solved it with the AIOM solution. I was also asking myself where the cache delete button was hidden
  9. Hi, recently I launched a site, where some templates have an enabled cache. Now I made some changes in the css file and noticed, that only if the cache is disabled, the css changes are visible in the frontend. I'm using the AIOM+ module. Is this a normal behavior?
  10. Thanks for your help. But for various reasons, I choose a different solution. One of the reason was, that I didn't thought about the accordion trigger. It can't be a link and trigger at the same time. So I'm gonna build a half static, half dynamic accordion menu. It's possible, cause it's with Processwire
  11. Hi Soma, thanks for this cool module – Danke I have a question about adding some additional stuff (data-attribut and css-styles) to the markup. I'm using the uikit: http://getuikit.org and I wanted to insert their accordion in my menu: http://getuikit.org/docs/nav.html (check »Accordion«) To convert a menu link into a accordion, I have to add this: <ul class="uk-nav uk-nav-parent-icon" data-uk-nav> and also this: <li class="uk-parent"> to a sublink. I'm trying to achieve this: Start Page 1 parent-subpage --> this shall be the accordion link item 1 item 2 item 3 Currently I'm using this: <?php $treeMenu = $modules->get("MarkupSimpleNavigation"); // load the module $options = array( 'parent_class' => 'parent', 'current_class' => 'active', 'has_children_class' => 'has_children', 'collapsed' => false, 'show_root' => true ); echo $treeMenu->render($options); ?> Thank you
  12. Hi, I'm new to PW and recently I discovered »Fredi«. This is really a cool feature, especially with all those additional options. I installed it, everything works fine, but the backend page doesn't open in a lightbox as shown in the screenshots and some screencasts. When I click on »Edit« I'm directed to my backend. After changing the content and clicking on »Save« I have to use the back arrow from the browser to go back to the front-end. Is this a normal situation? Nikolai
×
×
  • Create New...