Total.js define view location - total.js

This may be a silly question but I couldn't find a way to change the default views location in total.js.
Is it possible?

You can change this path in a /config file:
https://docs.totaljs.com/latest/en.html#api~FrameworkConfiguration~directory-views

Related

Drupal 8 - Overwriting a specific view page

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

resize default magento 1.7 product image

I have tried everything I could to change the default product size of magento please any help?
I need this to be bigger http://officeresourcegroup.com/new/desks/dmi/dmi-andover-series.html
You need to edit media.phtml in your theme. There is a resize call that makes the images 265x265.
here is a path for the file in base package, please exchange with your theme directories:
/app/design/frontend/base/default/template/catalog/product/view/media.phtml
look for the line:
$this->helper('catalog/image')->init($_product, 'image')->resize(265)
You need change this: $this->helper('catalog/image')->init($_product, 'image')->resize(265);
I think you are using an external module for the Zoom image, correct? Soon you should change the media.phtml this module. Look in the app/design/frontend/default/default/template/(extension-folder-zoom)/media.phtml or app/design/frontend/base/default/template/(extension-folder)/media.phtml. Note that (extension-folder) is the module name that you used.
Should you not find anyway, maybe the html is generated in the controller module, but usually not this way.
Another way to figure out which file you should use is the option to debug screens. Watch this video and will not doubt how:
http://www.youtube.com/watch?v=E4GLjYHaJig

How do I set the theme layout from within a module in PyroCMS?

I'm doing
$this->template
->set_breadcrumb(lang('stuff'), 'stuff')
->set_breadcrumb($col->title)
->set_layout('questions')
->set('title', $col->title)
->build('view', $this->data);
But my questions layout file in my my_theme folder.
How do I specify the layout directory?
Your question changed while I was answering it so now I am confused. This is correct, it previously wasn't.
PyroCMS Template Library docs
The location is addons/<default or shared_addons>/themes/<theme>/views/layouts/ and the questions.html layout should be set in there, right next to its buddy default.html.
You can of course skip all of this and just make a layout that has the same name as the module. So, remove the set_layout() method entirely and you've already completed your task.

Loading an ImageIcon from a source

i am making a game and i put some images on my ide/images folder but program gives null pointer exception error.my code for loading imageicon is like this
ImageIcon ac=new ImageIcon(getClass().getResource("images/actor.jpg"));
ImageIcon ac1=new ImageIcon(getClass().getResource("images/actor_shoot.jpg"));
//some codes
Image n=ac.getImage();
//some codes
i tried but couldn't find,whats your suggestions?thanks.
Try with an absolute path ? ("/images/actor.jpg") ?
Is your folder /images resides in same diretory in which your class is?
i.e., is your class is also in /ide folder?
Check the path. Are the files really in the images folder?
Are they called what you say there are called?
Are they the right case, if you're on a case-sensitive file system (in other words that actor.jpg and ACTOR.JPG are two different files)?
Are the images a resource? (Also look here.)
Try doing step-by-step what is described here (NetBeans documentation).

MVC3 Prevent Editor Template From Being Used

I have a Views folder that has a pageBaseType of Class1 specified in the web.config. In my Areas/MyProject/Views folder I have a web.config that specifies pageBaseType Class2. MyProject is incompatible with class1.
There is a Views/Shared/EditorTemplates/String.cshtml file that's needed everywhere else in the system except for MyProject. Because String.cshtml uses Class1, and MyProject can't it causes errors.
Is there a good way to prevent the inheritance of the EditorTemplates folder in MyProject? I can copy paste the entire contents of EditorTemplates into MyProject/Views/Shared, and that stops it, but I don't want to have to remember to copy files every time we add a new cshtml to EditorTemplates.
What is it that your string editor template does?
If you need to render a specific template for a model property you can use the [UIHint] attribute or the [DataType] attribute. It would be better to do this if you don't intend for it to be used globally. Note that you will need to change the template name to something unique e.g. MyStringTemplate.cshtml.
Based on your comment, that you wish the editor templates to be global but not use them in your Area, my suggestion is to not use #Html.EditorFor(...) in your views, and instead create the form fields explicitly e.g. #Html.TextboxFor(...).

Resources