Search found 12 matches

by ctuxboy
Sun Aug 29, 2021 9:05 pm
Forum: Themes
Topic: Count parent/child pages
Replies: 1
Views: 162

Re: Count parent/child pages

Found a solution counting the children-pages... <?php // Count ALL dogzones // Page number of the paginator, the first page is 1 $pageNumber = 1; // The value -1 tell to Bludit to returns all the pages on the system $numberOfItems = -1; // Only get the pages with the satus published $onlyPublished =...
by ctuxboy
Fri Aug 27, 2021 11:23 pm
Forum: Themes
Topic: Count parent/child pages
Replies: 1
Views: 162

Count parent/child pages

Hello,

What is the best way show total number of:
- childpages
- parent pages

This code shows the total number of ALL published pages:

Code: Select all

<?php echo count($pages->getList(1, -1, true)); ?>
by ctuxboy
Thu Jul 01, 2021 10:55 pm
Forum: Themes
Topic: [SOLVED] Check User role
Replies: 4
Views: 440

Re: Check User role

<?php $Login = new Login(); if ( in_array($Login->role(), array("author","admin",true) )) { echo '<a href="/bludit/admin/edit-content/'.$page->key().'">Edit</a>'; } ?> Without checking user roles you can use if ($login->isLogged() instead of if ( in_array($Login->role(), array("author","admin",true...
by ctuxboy
Thu Jul 01, 2021 10:51 pm
Forum: General
Topic: Search custom fields
Replies: 6
Views: 432

Re: Search custom fields

Hi Edi,

Found a solution making the Custom fields searchable, i posted in plugins:
viewtopic.php?f=21&t=2109
by ctuxboy
Thu Jul 01, 2021 10:38 pm
Forum: Plugins
Topic: HACK: Search plugin: custom fields in search results
Replies: 0
Views: 234

HACK: Search plugin: custom fields in search results

Hello, Found a solution how can searching also custom fields. Adding this code in ../search/plugin.php (below line 209): $cache[$pageKey]['CUSTOM-FIELD'] = $page->custom('CUSTOM-FIELD'); Replace CUSTOM-FIELD with the name from your custom-field, (only useful for string-type custom fields). search-cu...
by ctuxboy
Thu Jul 01, 2021 9:49 pm
Forum: Themes
Topic: [SOLVED] Check User role
Replies: 4
Views: 440

Re: Check User role

Hi ctuxboy, with print_r($users) you just print out the database of users. Here https://forum.bludit.org/viewtopic.php?t=1216 is a thread with the solution for your question. Just use: <?php $Login = new Login(); if ( in_array($Login->role(), array("author","admin",true) )) { echo '<a href="/bludit...
by ctuxboy
Thu Jul 01, 2021 10:45 am
Forum: Themes
Topic: [SOLVED] Check User role
Replies: 4
Views: 440

[SOLVED] Check User role

Hello, Missing a good search/filter-function in the dashboard -> manage content (i know there is a search function in de dashboard, but it's limited to the page-titles), so i used the front-end search plugin that also search in pages-content. So for 'fast' find and editing the content from the front...
by ctuxboy
Mon Jun 28, 2021 1:04 pm
Forum: General
Topic: Custom templates
Replies: 1
Views: 191

Re: Custom templates

Found it!
If click 'Preview' then the custom template doesn't load!
But if you looking the 'complete' website, then it's works!
Is this an issue?
by ctuxboy
Mon Jun 28, 2021 12:57 pm
Forum: General
Topic: Custom templates
Replies: 1
Views: 191

Custom templates

Hello, Try understand how adding my own template pages: - city.php - province.php -.. For testing add a new php-file in the active theme ../php dir: city.php In the dashboard, add new content and adding a template-name: city in the options-tab (se screenshot). Schermafbeelding 2021-06-28 om 12.44.38...
by ctuxboy
Tue Jun 22, 2021 11:57 am
Forum: General
Topic: Search custom fields
Replies: 6
Views: 432

Re: Search custom fields

Hi,

Thx, i will do it ;)

Regards,
Christophe