Adam Mateusz Brożyński
Adam Mateusz Brożyński
TCTwill CMS
Created by oxana on 7/5/2024 in #👊support
Preview doesn't work
It shows up when there's an error when rendering template. Open Dev tools → Network in browser, refresh page, click preview and check response for preview template file.
4 replies
TCTwill CMS
Created by Adam Mateusz Brożyński on 7/2/2024 in #👊support
Related page is null in translated menu items (following guide)
Great. I will be happy to contribute. 🙂
22 replies
TCTwill CMS
Created by Adam Mateusz Brożyński on 7/2/2024 in #👊support
Related page is null in translated menu items (following guide)
No description
22 replies
TCTwill CMS
Created by Adam Mateusz Brożyński on 7/2/2024 in #👊support
Related page is null in translated menu items (following guide)
This works fine. I thought that this is the default for sortables. 🤔
22 replies
TCTwill CMS
Created by Adam Mateusz Brożyński on 7/2/2024 in #👊support
Related page is null in translated menu items (following guide)
In admin panel everything seems to be ok. Also rendered menu on frontpage is working fine, but just the order is wrong.
22 replies
TCTwill CMS
Created by Adam Mateusz Brożyński on 7/2/2024 in #👊support
Related page is null in translated menu items (following guide)
MainMenuLink::published()->defaultOrder()->get()->toTree(); gives positions order: 3, 0, 2, 5, 1.
MainMenuLink::published()->defaultOrder()->get()->toTree(); gives: 0 , 3, 4, 2, 5, 1, MainMenuLink::published()->get()->defaultOrder()->toTree(); throws error
22 replies
TCTwill CMS
Created by Adam Mateusz Brożyński on 7/2/2024 in #👊support
Related page is null in translated menu items (following guide)
I have another problem with menu – this time with ordering. Order is ok in admin panel (saved properly by artisan queue:work), but not when rendering… I use:
$links = MainMenuLink::published()->get()->toTree();
return view('components.main-menu', ['links' => $links]);
$links = MainMenuLink::published()->get()->toTree();
return view('components.main-menu', ['links' => $links]);
22 replies
TCTwill CMS
Created by Adam Mateusz Brożyński on 7/2/2024 in #👊support
Related page is null in translated menu items (following guide)
Also there is no locale switcher on module list or some kind of global switcher like on page edit (top right just before 'editor' button) that would allow quickly to see translated content. Maybe it would be a good idea to have just one switcher for all content in top menu bar next to user menu?
22 replies
TCTwill CMS
Created by Adam Mateusz Brożyński on 7/2/2024 in #👊support
Related page is null in translated menu items (following guide)
This approach seems to be reasonable, but it would be a good idea to have bulk action to enable a language for many pages, because even though I had translations and they were published I had to go again one by one to tick language checkbox on every page.
22 replies
TCTwill CMS
Created by Adam Mateusz Brożyński on 7/2/2024 in #👊support
Related page is null in translated menu items (following guide)
I found the source of problem. I checked "active" languages in Menu but while having translations of my pages published, language checkbox was not set. So menu was rendering fine but translated pages were not "accesible" even though they were published. It's a bit confusing to have to set two attributes on a page to make it visible in frontend.
22 replies
TCTwill CMS
Created by Adam Mateusz Brożyński on 7/2/2024 in #👊support
Related page is null in translated menu items (following guide)
Yes and I see same related page in admin panel when switching to translation, so I am expecting to get same related page no matter of locale setting. But on different locale related page is null.
22 replies
TCTwill CMS
Created by Adam Mateusz Brożyński on 6/29/2024 in #👊support
Is it possible to use Twill with Twig (rcrowe) for frontend (block and module templates)?
Do you know what would be the right way to get component model instance so I could render it in twig template instead of blade? Edit: Ok, I've answered myself:
public function component($component): View
{
$className = "App\\View\\Components\\".$component;
$component = new $className;
return $component->render();
}
public function component($component): View
{
$className = "App\\View\\Components\\".$component;
$component = new $className;
return $component->render();
}
And now:
{{ component('MainMenu') }}
{{ component('MainMenu') }}
6 replies
TCTwill CMS
Created by Adam Mateusz Brożyński on 7/1/2024 in #👊support
block->imagesAsArraysWithCrops('image_set') gives objects with empty alt and caption
Now it works. Thanks. I thought it's global config for all props on website. 🙂
17 replies
TCTwill CMS
Created by Adam Mateusz Brożyński on 7/1/2024 in #👊support
block->imagesAsArraysWithCrops('image_set') gives objects with empty alt and caption
Ok, thanks for link… I guess I defined it wrongly. I will check if it'll work.
17 replies
TCTwill CMS
Created by Adam Mateusz Brożyński on 7/1/2024 in #👊support
block->imagesAsArraysWithCrops('image_set') gives objects with empty alt and caption
No description
17 replies
TCTwill CMS
Created by Adam Mateusz Brożyński on 7/1/2024 in #👊support
block->imagesAsArraysWithCrops('image_set') gives objects with empty alt and caption
So am I defining it wrong in twill.php? I followed docs…
'default_crops' => [
'myimage' => [
'default' => [
[
'name' => 'default',
'ratio' => 4 / 3,
]
]
]
],
'default_crops' => [
'myimage' => [
'default' => [
[
'name' => 'default',
'ratio' => 4 / 3,
]
]
]
],
17 replies
TCTwill CMS
Created by Adam Mateusz Brożyński on 7/1/2024 in #👊support
block->imagesAsArraysWithCrops('image_set') gives objects with empty alt and caption
I've checked now on my working database – I cannot use any other crop and field name than 'image' if I want to have images.It is also in case of new blocks. Only 'image' crop and field nameworks and that's it.
17 replies
TCTwill CMS
Created by Adam Mateusz Brożyński on 7/1/2024 in #👊support
block->imagesAsArraysWithCrops('image_set') gives objects with empty alt and caption
I've tried two times on fresh database – the name has to be 'image' (and crop def) otherwise medias array is empty and cannot do $block->images('<name>'). Is is possible there's some kind of cache that optimize:clear and composer dump-autoload is not flushing? I had 'image' name at the very begining when I was creating first block with that name. Now I cannot use any other crop/field name because it's always empty.
17 replies
TCTwill CMS
Created by Adam Mateusz Brożyński on 7/1/2024 in #👊support
block->imagesAsArraysWithCrops('image_set') gives objects with empty alt and caption
Ok this is strange. It started to work on freshdb only when I change medias form name to image and add to twill.php:
'default_crops' => [
'image' => [
'default' => [
[
'name' => 'default',
'ratio' => 4 / 3,
]
]
]
],
'default_crops' => [
'image' => [
'default' => [
[
'name' => 'default',
'ratio' => 4 / 3,
]
]
]
],
Any other name in form and duplicated in twill.php just won't work. I've cleared cache but nothing helps. Any ideas what is happening?
17 replies
TCTwill CMS
Created by Adam Mateusz Brożyński on 7/1/2024 in #👊support
block->imagesAsArraysWithCrops('image_set') gives objects with empty alt and caption
Its even weirder because after saving when I do {{dump($block)}} i see medias array there. But when I try to dump it by {{ dump($block->medias)}} then it's empty. I applied patches but no change.
17 replies