I'm new at Laravel and I'm testing at the moment. And its actually really nice. But now I've got a problem and I don't have a clue how to solve it.
What I did:
Installed Laravel 5.7
Installed Voyager
Installed Voyager Frontend
Installed Voyager Blocks
Now i created my own Block. I want to create an block to display an dynamic slider.
Inside my Page in my Backend it looks actually like this:
http://nimb.ws/gp1WkX
For this my Code inside the /config/page-blocks.php looks like: http://nimb.ws/XVzyCN And you can see i create 6 instances (manually) inside the slider block.
My Output inside the "dynamic_slider.blade.php" look like this: http://nimb.ws/N8ovGD and there is nothing dynamical.
What I want to do:
I want only one instance in my block. With my Image, Title, Subtitle
and Link for my Slide. If an image is uploaded for the first slide -
a second instance reveal and i can add a second slide. And so on...
I want to output my slides inside an foreach loop on my
dynamic_slider.blade.php
I think I know how to output the loop but I cant figure out the step for my admin-block. I hope you guys can help me.
Related
,
im try to create an view and having troubles.
im trying to create a row of Images with ngFor , so i dont know the exec number of images that will apper on the screen but in need it to look like that ,
in case of 3 photos it will be in one line but when the fourth Image will added it will go down to a new line
thank you
that problem can be resolve with warpLayout
WrapLayout
I guess this question has already been posted in different forms over time, but I still didn't find the answer I'm looking for:
I'm having trouble implementing vueJS in my Laravel app, I want to keep server and front-end very much separated but in this case it doesn't seem so easy. I have the classic blog project, where every article has some tags associated with it, so there's a classic many-to-many relationship and everything is set.
When I edit an article, I wanna have a section where all the tags are displayed and also you can add a new tag (very stackoverflow-like), what I wanna achieve is that my Javascript (and so my vue) only manages the rendering of those tags on the page, so that when I enter in the edit page I can see all associated tags, BUT, i only want to edit the input tag inside my form, I don't want to do a POST request in Vue, I want to keep it PHP, I want laravel validation, I don't want to write another one for the javascript.
I want javascript to only edit the DOM when I want to add a tag, so that I insert a new one and it immediately gets pushed inside the already existing array of tags, so in real-time the tags are updated, but when I submit the form it is my PHP that handles the server request, not vue, and this for now seems impossible because in order to update the tags correctly when adding one (or removing one), the data inside vue needs to have a list of tags, otherwise it won't work.
This means I have to create a new route (for example /tags/{article_id}) and a new controller function in order to return tags associated with that article, so this also means that I can't give to PHP the tags that I rendered (cause for example they're in a list, not an input select (due to the appearence I want to give)) isn't there a cleaner way to do this?
I'm trying to wrap my head around vuejs but sometimes it feels like stuff would be easier in jQuery (?), I don't know... I hope I explained myself correctly.
I wanted to ask if there is a possibility to force Joomla to use full article image if intro image is empty (everywhere where image should be visible).
Is there a setting for this? Is it a feature of a template or Joomla engine itself? Right now I always have to specify both of this images, cause if I specify one only full article image Joomla does not display miniature in many places. If I specify the other one miniature is there but when I enter article it is missing.
I always end up having to specify the same image twice. Is there any way around this?
Thanks
UPDATE1:
I ended up overwriting the template for article to display $images->intro_image whenever $images->image_fulltext is not available.
This solves my problems yet one joomla user tells me she is sure that they were able to do that before without any modifications in the template. So now I'm just wondering if there is a setting for this in Joomla Admin so that it does not have to be forced in template code
It turned out that each element of my page except full article used intro_image. So what I did was to copy out the part responsible for showing article into the html folder of my template and just added a php code to use intro image instead of fulltext image (if it is present). You basically need to change $image->fulltext to $image->intro_image in the condition. But remember to keep the original condition as an elseif condition if you want to be able to still use full text image
I've PyroCMS project running on my intranet, and i have used the flicker gallery from https://arthurguy.co.uk/code/pyrocms-add-on-flickr-gallery
The Back end that is admin panel showing all the photo galleries (21), but the front end of site not showing the Last two added photo galleries.
contacted the author but he might not able to provide feed Back.
Going through this issue, it might looks like the cache problem as this addon use the cached result as well, so first try to change the cache length from the admin panel settings and check the results.
If the problem remains there the look into the front end controller flicker_gallery and check in the index function.
There is code snippent like this
if (! $photosets = $this->pyrocache->get('flickr_gallery_get_photosets'))
Just remove that not ! operator from the condition and check the results on front End. Then provide your response.
I'm using FPDI together with TCPDF to add a page to a already existing PDF-file. This works great, but I have one problem. When I output the new PDF I get an automatic page counter in the lower right corner, "112/299" for example. I find no documentation in FPDI or TCPDF about this automaticly generated page counter.
This problem only occurs when I put the file through FPDI, which narrows it down to FPDI I suppose.
My question is: How do I remove this god awful page counter in the bottom right corner of every page in my FPDI-generated PDF-file.
Thankful for answers.
I solved it, finally. The thing was, TCPDF puts default headers and footers on every page it generates, you can disable this with;
$object->setPrintHeader(false);
$object->setPrintFooter(false);
The thing was, I use FPDI to concatenate two PDF-files into one. To do this, you have to iterate over every page in both of the files you want to put together, and then finally add all these pages to a new PDF-file and output it.
So the solution was disabling the header and footer in every page sent to the new PDF-file, in the object it self who iterates over this. Just use;
$this->setPrintHeader(false);
$this->setPrintFooter(false);
If you're using PHP of course, otherwise you'll figure it out!