Search found 25 matches
- Fri Dec 09, 2022 11:20 pm
- Forum: Themes
- Topic: [SOLVED] Add category to blogpost in page-template
- Replies: 1
- Views: 883
[SOLVED] Add category to blogpost in page-template
Hello, I'm struggle how to add the category and tags to the blogpost page. For tags found this topic https://forum.bludit.org/viewtopic.php?p=7606&hilit=tags#p7606 But can't find a solution how display blogpost's category. Looking in the documentation https://docs.bludit.com/en/dev-snippets/cate...
- Fri Dec 09, 2022 9:09 pm
- Forum: General
- Topic: [SOLVED] Blogpost in /posts/ url
- Replies: 1
- Views: 590
Re: Blogpost in /posts/ url
Hello,
I found it!
I apologize it was a mistake, i was confused about the page-field in Settings -> Advanced , when adding /posts/ to this field it did the job for the blogposts
I found it!
I apologize it was a mistake, i was confused about the page-field in Settings -> Advanced , when adding /posts/ to this field it did the job for the blogposts
- Thu Dec 08, 2022 12:53 am
- Forum: General
- Topic: [SOLVED] Blogpost in /posts/ url
- Replies: 1
- Views: 590
[SOLVED] Blogpost in /posts/ url
I will build/develop a blog-website, but i struggle with the url for the blogposts. This is how i will plannend the urls: - /homepage (loop over the blogposts) - /disclaimer - /posts/ blogpost-1 - /posts/ blogpost-2 - /posts/ blogpost-3 - ... I know that it's possible adding the /posts/ url , by cre...
- Sun Aug 29, 2021 9:05 pm
- Forum: Themes
- Topic: Count parent/child pages
- Replies: 1
- Views: 1227
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 =...
- Fri Aug 27, 2021 11:23 pm
- Forum: Themes
- Topic: Count parent/child pages
- Replies: 1
- Views: 1227
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:
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)); ?>
- Thu Jul 01, 2021 10:55 pm
- Forum: Themes
- Topic: [SOLVED] Check User role
- Replies: 4
- Views: 4455
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(...
- Thu Jul 01, 2021 10:51 pm
- Forum: General
- Topic: Search custom fields
- Replies: 6
- Views: 1516
Re: Search custom fields
Hi Edi,
Found a solution making the Custom fields searchable, i posted in plugins:
viewtopic.php?f=21&t=2109
Found a solution making the Custom fields searchable, i posted in plugins:
viewtopic.php?f=21&t=2109
- Thu Jul 01, 2021 10:38 pm
- Forum: Plugins
- Topic: HACK: Search plugin: custom fields in search results
- Replies: 0
- Views: 9928
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...
- Thu Jul 01, 2021 9:49 pm
- Forum: Themes
- Topic: [SOLVED] Check User role
- Replies: 4
- Views: 4455
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) )) { ec...
- Thu Jul 01, 2021 10:45 am
- Forum: Themes
- Topic: [SOLVED] Check User role
- Replies: 4
- Views: 4455
[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...