I'm using three.js to render a model that is localy stored in my system folder. In chrome after I render the first time the model files seems to be stored in cache because if i change the file and reload the page the there is no change in the rendered model. I cannot clear the cache due to other reasons . Kindly help me with this problem. Is there any way i can reload the models after the files are changed. Thanks in advance for helping.
To address your first issue, three.js would always cache the model files to reduce the time taken to load the files. To overcome this you can make use of the anti-cache trick, that is to append a random value to the end of the model file url like this.
"http://localhost/models/model.json?" + Math.random()
Hope it helps!
Related
I have created a view with several pages. As it is displayed to me with the debug mode, I can also use the view:
views-view-fields--foobar.html.twig
Overwrite With me the whole then looks as follows:
views-view-fields--nd-portfolio-filter.html.twig
Now I would like to overwrite a certain page of my view. I can't find anything suitable in debug mode.
According to https://www.drupal.org/docs/8/theming/twig/twig-template-naming-conventions it should work according to the following pattern:
views-view-fields--foobar--page.html.twig
according to this logic it should look like this with me then as follows:
views-view-fields--nd-portfolio-filter--theaterfotos.html.twig
Unfortunately, that doesn't work. "theaterfotos" is the system name of the page of my view.
Do I have a thought error now? Would be grateful for any help.
Thnx Bavra
As of my understanding of your question you want to apply to the template on a specific page of view.
Your logic is right but I think your name was incorrect it should be in this format
[base template name]--[view machine name]--[view display id].html.twig
on your case, it should be like below because views machine name not using "-"(dash in between) on lowercase and underscores
views-view-fields--nd_portfolio_filter--theaterfotos.html.twig
you should try this and clear the cache of drupal. Hope this will helps you
Thanks
I'm sure that there is something about this "problem" somewhere but I didn't found it...
I'm using Vich_Uploader bundle in my Symfony2 project. One entity has 1 reference image and a OneToMany secondary images. For the création, I've nearly no problem ( without the fact that my secondary images aren't linked to my Entity but that's not the point ) but during edit, there is nothing in the "Reference image" input and if I submit, I recieve the error : this input is required...
Someone got a tip to give the imageFile to the input?
Thanks & Regards,
Thomas
You can't automatically fill an upload field as it would induce great security issues.
The solution to your problem would be to define your image fields as not required if there already are images (ie: the object is not new).
My sites include large segments of data via php's include(). This has worked well but I'm building a CMS and ran into an issue...
When I load the page to be edited, the included file doesn't print. I'm sure this is a relative path issue but the question is: What's the best way to deal with this?
I'm using TinyMCE and it puts all of the PHP into <!----> comments anyway, so I may be in big trouble here (I need to keep the PHP header()).
I'm thinking that I will have to just place the included data directly into the page so it doesn't get lost when loaded into the editor. I can probably move the header() into a higher document and have it change with variables, but before I do...
Is there a better way than include() to attach large segments of data?
Please tell me how to change the image source in magento dynamically.say I want that after every 10 seconds I want to change the source of image.
now I have define a static block which contain image src with id banner..
now my question is where should I define for changing the image source and how to change the source.
I would suggest looking into a jQuery based image rotator. There are some simple examples out there such as this one:
http://burnmind.com/tutorials/how-to-create-a-simple-automatic-image-rotator-using-jquery
Also be careful not to cause conflicts with jQuery and Prototype. You can use this method to avoid this from happening.
Refer to these links: They are free extensions which may serve your purpose.
http://expertmagentodevelopers.wordpress.com/2012/04/24/download-magento-banner-slider-extensions-free/
http://www.magentocommerce.com/magento-connect/banner-slider-3912.html
http://www.magentocommerce.com/magento-connect/Interakting.com/extension/2255/interakting-slider#overview
I'm looking for a way to have ALL of my single post pages (single.php) show the full size image regardless of the custom sizes i've posted for my home index page.
Amongst my many tries and fails i attempted this featured image solution but it didn't really work for my purposes.
http://voodoopress.com/2011/04/woking-with-featured-image-in-wordpress/
Is there a plugin for this that maybe I don't know about?
My PHP knowledge is limited to say the least.
Is there a php code that i can put into the single.php file to make this happen?
Any help is greatly appreciated .
Thanks.
You can pass a size parameter of 'full' to the the_post_thumbnail() function like this
<?php the_post_thumbnail('full'); ?>