Error: Call to a member function getLocale() on null (1) Hi, You can find the code for getting active locale here: https://github.com/shahroq/whale_c5_cheat_sheet#get-active-locale says shahroq on 01/18/21 at 6:18 pm, in reply to Hello, i have footer.php this …
broken themes I answered this on the theme discussion area in case anyone faces a similar issue. https://www.concrete5.org/marketplace/themes/pixel/support/theme-breaks says shahroq on 12/16/20 at 7:38 am, in reply to hi A new install of Concrete …
How to batch editing attributes? The `fly-out` menu still exists on 5.7+, though it might be less conspicuous. Check the attached screenshots. says shahroq on 08/17/20 at 2:14 pm, in reply to anybody?
Echo page thumbnail URL You can find the required code on this cheatsheet: https://github.com/shahroq/whale_c5_cheat_sheet#get-a-page-attribute says shahroq on 07/05/20 at 5:49 am, in reply to Edit - I have managed to get t…
Programmatically add values to a select attribute from a package Hi, You can find the solution on this cheatsheet: https://github.com/shahroq/whale_c5_cheat_sheet#add-an-attribute says shahroq on 06/10/20 at 6:52 pm, in reply to I am trying to create a packag…
Routing using a Controller - concrete5 Route Example - c5-8.5.2 In your code, the class name does not match the file name. Renaming `/application/src/Api/Controller/User.php` to `/application/src/Api/Controller/UserController.php` should fix th… says shahroq on 12/26/19 at 9:51 am, in reply to Thank you for hanging in here …
Hi, The 'error page script' you have pasted seems like an apache error and, in turn, suggests the 'Pretty URL' is not enabled in your site (/index.php/dashboard/system/seo/urls) a… says shahroq on 12/25/19 at 5:46 pm, in reply to I can't tell whether the error…
Did you get Apache 'Not Found' page or c5 404 page? Placing code like this should definitely return your text: [code] Route::register('/test', function() { print 'This is a… says shahroq on 12/24/19 at 6:52 am, in reply to shahroq, Thank you for help…
A descriptive code as to how a route is registered is housed inside /application/bootstrap/app.php: line 28-41. In your case, using this code should simply do the trick: [code] … says shahroq on 12/23/19 at 8:09 pm, in reply to I have attempted to get the De…
Search form results showing by newest Did you notice the $page has been substituted for $r in the first line? says shahroq on 09/09/19 at 6:34 pm, in reply to As I wrote earlier, I used thi…
Use this piece in your serach block template, in the results loop: [code] says shahroq on 09/09/19 at 6:12 pm, in reply to But I want to list thumnails i…
By copying this section (Image/File), you will have all the data of your page `thumbnail` attribute. Then you will be able to use them in your HTML code. https://github.com/shahro… says shahroq on 09/09/19 at 5:49 pm, in reply to Yes, this works. Thank You ver…
Hi, You can sort the search result by different criteria in the search block controller: do_search() method. In your case adding this line before calling getPagination() method s… says shahroq on 09/09/19 at 4:36 pm, in reply to Hi. Do you know how to modify…
Delete Express entries in bulk The code should be like this: [code] Route::register('/testapi', function() { echo "Test API:"; $entity = Express::getObjectByHandle('entity_handle'); $entityList … says shahroq on 08/15/19 at 7:57 pm, in reply to Thank you once again, shahroq.…
copy a page, duplicate a page This is mostly what is called "Page Types" in C5. You can create one in the dashboard: /index.php/dashboard/pages/types says shahroq on 08/04/19 at 8:17 am, in reply to I have a page layout and conte…
Delete Express entries in bulk Hi, If you don't have any specific criteria and intend to remove all entries, skip the "if" part. And the "echo" part just indicates that you are at the block. You can comment th… says shahroq on 07/26/19 at 6:39 pm, in reply to Thank you for the quick respon…
Clearly, the current version of C5 is not capable of deleting entries in a batch. However, if you are comfortable with writing a few lines of codes, it can be done by C5 API: [cod… says shahroq on 07/26/19 at 9:10 am, in reply to I have a client that receives …
UserList from list of user ids [code] $userList = new UserList(); $userList->filter(false, 'u.uID IN (1, 2)'); //by cIDs $users = $userList->getResults(); foreach ((array)$users as $user) { echo $us… says shahroq on 07/05/19 at 9:46 am, in reply to Hi, I really need to get a Us…
Creating Express Objects programmatically Hi, [code] //topics $settings = new \Concrete\Core\Entity\Attribute\Key\Settings\TopicsSettings(); $settings->setTopicTreeID($topicTreeID); $settings->setParentNodeID($topicPa… says shahroq on 07/02/19 at 8:00 pm, in reply to I'm creating Express-Entities …
Allowed memory size of 134217728 bytes exhausted (tried to allocate 12288 bytes) Hi, Increasing the PHP "memory_limit" in your server php.ini file should resolve this. The default value is usually 128M. This can be pushed up to 256M. says shahroq on 06/12/19 at 4:47 pm, in reply to Hello, I am constantly gett…