Jump to content

Fokke

Members
  • Posts

    74
  • Joined

  • Last visited

  • Days Won

    5

Community Answers

  1. Fokke's post in Title field not shown on page creation was marked as the answer   
    Hi there!
    Check configuration for "title" field. If you have unchecked "Global" option, the field will not be shown in the first step of page creation.
  2. Fokke's post in Create new page in page was marked as the answer   
    Hello!
    Have you tried this module? With this you can edit company pages directly via page field.
    http://modules.processwire.com/modules/admin-page-field-edit-links/
  3. Fokke's post in Active Navigation CSS Not Working with Multiple Menu Locations was marked as the answer   
    That's because $page object is not in scope when used in function.
    Try changing the line:
    $classy = $child === $page ? " class='current'" : ''; to:
    $classy = $child === wire('page') ? " class='current'" : ''; There's also a versatile MarkupSimpleNavigation module for outputting navigations.
  4. Fokke's post in prevent settings tab in page edit was marked as the answer   
    Hi Spica!
    Create a new permission called "page-edit-show-settings-tab" and adjust the roles to fit your needs.
    In /site/templates/admin.php add the following before the line: require($config->paths->adminTemplates . 'controller.php');
    function hideSettingsTab(HookEvent $event) { // Get the page being edited $page = $event->object->getPage(); if (!wire('user')->hasPermission('page-edit-show-settings-tab', $page)) { $page->template->set('noSettings', 1); } } $wire->addHookBefore('ProcessPageEdit::buildForm', null, 'hideSettingsTab'); After a quick test, this seems to work fine on my setup. 
  5. Fokke's post in Undefined variable: template was marked as the answer   
    Hi!
    Try using $page->template->name instead.
  6. Fokke's post in all languages with the same prefix? was marked as the answer   
    Hi!
    Those prefixes are being used only in pagination, as the title says  
    Edit your home page, open Settings tab and change page names there.
  7. Fokke's post in js library for simple product image gallery with thumbnails (no lightbox or transitions, just click and view)? was marked as the answer   
    Hi!
    As apeisa mentioned, this is very simple to build. Unless you need preloading, transitions etc, something like this should cover your needs.
    <img id="big" src="image1.jpg"> <div id="thumbnails"> <a href="image1.jpg"><img src="image1_thumb.jpg"></a> <a href="image2.jpg"><img src="image2_thumb.jpg"></a> <a href="image3.jpg"><img src="image3_thumb.jpg"></a> </div>  And jQuery...
    $("#thumbnails a").on('click', function(e) { e.preventDefault(); $('#big').attr('src', $(this).attr('href')); });
  8. Fokke's post in Best practice: Where to store functions to generate page output was marked as the answer   
    Hello there!
    Just place it into the template. If you need to run the same code on the other templates, write a function. A module would seem like an overkill here.
  9. Fokke's post in PageArray issue on page fields was marked as the answer   
    Hi!
    Try the following:
    <pre><?php echo 'items before: ' . count($page->advertize_homepage) . "\n"; $slides = clone $page->advertize_homepage; $slides->append($page->advertize_sidebar); $slides->shuffle(); echo 'items after: ' . count($page->advertize_homepage); ?></pre>
×
×
  • Create New...