I am trying to learn meteor, so I created few sample which worked fine. I searched for boiler plate and came across http://www.meteorkitchen.com/examples which is very helpful.
I setup the http://generator-accounts.meteor.com/ and added Login with facebook and google out of which Google worked fine.
The sample I am working on need sub pages for which I referred Subpages example and modified code but it is not working as expected.
Now the requirement is whenever I click on menu the content should be displayed below the menu.
So I modified the template
<template name="HomePrivate">
<div class="page-container container">
<div class="row">
<div id="navbar" class="navbar navbar-inverse" role="navigation">
<div class="navbar-container container">
<div id="listing" class="collapse navbar-collapse">
<ul id="menu-items" class="nav navbar-nav">
<li id="menu-item-simple" class="{{menuItemClass 'home_public'}}">
<a href="{{pathFor 'home_private.general_information'}}">
<span class="item-title">
General Information
</span>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row">
<div id="subcontent">
{{> yield region='HomePrivateSubcontent'}}
</div>
</div>
</div>
</template>
and in route
this.route("home_private.general_information", {path: "/home_private/general_information", controller: "GeneralInformationController"});
Now when I click on menu item it replaces the menu as well whereas my understanding is the content should be rendered in
{{> yield region='HomePrivateSubcontent'}}
Please advice.
I have solved the problem.
Please use the YAML version instead of JSON version to setup locally.
https://github.com/perak/kitchen-examples/tree/master/example-subpages
and some changes in controller were required.
Related
I am attempting to use the the bing translator on a site I am working on but I am not able to get it to display on the page. I have tried do what is suggested on the following site: https://www.bing.com/webmaster/tools/translator/
The following code has been applied to a navigation script as so
<header>
<div class="col-xs-12 col-md-8 pull-right collapse navbar-collapse navbar-ex1-collapse">
<div class="navbar-form navbar-right form-inline hidden-xs hidden-sm">
<div id='MicrosoftTranslatorWidget' class='Dark' style='color:white;background-color:#555555'></div>
</div>
</div>
<script>
setTimeout(function(){{var s=document.createElement('script');s.type='text/javascript';s.charset='UTF-8';s.src=((location && location.href && location.href.indexOf('https') == 0)?'https://ssl.microsofttranslator.com':'http://www.microsofttranslator.com')+'/ajax/v3/WidgetV3.ashx?siteData=ueOIGRSKkd965FeEGM5JtQ**&ctf=False&ui=true&settings=Manual&from=';var p=document.getElementsByTagName('head')[0]||document.documentElement;p.insertBefore(s,p.firstChild); }},0);
</script>
</header>
Any help would be appreciated.
As MS translator blog said, The Translator Web Widget will be retired on July 31, 2019. Beginning July 31st, the widget will no longer translate your webpages.
That could be a reason why your code doe4sn't work...
I tried to show shopping cart icon always in right side for mobile,tab,desktop using boostrap but it is not working for responsive.How can i show shopping cart icon always right side.
<div class="shopingicons mr-auto">
<a href="cart.html" class="icons-btn d-inline-block bag">
<span class="icon-shopping-bag"></span>
<span class="number">2</span>
</a>
</div>
Demo:https://jsfiddle.net/nvk87are/9/
Add your following code after </ul> tag in the navbar code. I tried it in your code and it worked.
<div style="float:right">
<div class="shopingicons mr-auto">
<a href="cart.html" class="icons-btn d-inline-block bag">
<span class="icon-shopping-bag"></span>
<span class="number">2</span>
</a>
</div>
</div>
Want more help? Reply and ask again
Your navbarResponsive is hidden in responsive mode and in larger view it's showing up and taking the place of your cart icons.
You can swap the position of your #navbarResponsive and the .shoppingicons. screenshot
Here you can check the working-demo
I'm working a little dashboard app for one of our internal systems, and opted to add a full-screen overlay when something is loading. It all works fine in Chrome, but on Edge I get something to this effect...
As far as I can tell its caused by having the fa-spin class on my main loading indicator as well as the overlay being transparent. I've removed fa-spin, Edge still has a few weird side effects (that I can live with), but it exacerbated by having the spin effect active.
Questions:
Has anyone encountered this before as my google attempts are returning seemingly futile results. Is there even a fix / work around for this, or is it just Edge being Edge...
Even though I'd love to opt and say to our users to not use Edge / IE, I'd feel like I'm giving up which isn't an option :P
HTML structure (More or less)
<div class="container-fluid" ng-class="{ 'overlay' : vm.isLoading }">
<div ng-if="vm.isLoading">
<div class="overlay-modal">
<p><i class="fa fa-gear fa-spin"></i>
</p>
</div>
</div>
<div class="col-md-7 main">
<div class="container-fluid">
<div class="row">
<div class="row">
<div class="col-md-12 container-fluid" ng-class="{ 'blur' : vm.isLoading }">
...
</div>
</div>
<div class="row">
</div>
</div>
</div>
</div>
<div class="col-md-5">
...
</div>
</div>
I've just tried on my dashboard application using fa-spin and I can assure you that it didn't caused my issues. I've tried fontawesome both from cdn and embedded in my static files. Most probably that weird effect is caused by a number of overlapping CSS/JS styles/class toggling. I hope this answers your question.
Quite new to Drupal theming and need some help editing the markup a view outputs.
I know I have page templates, node templates, block templates; but what about views?! I choose the fields that are displayed in the results using views UI but that doesn't let me customise the outputted markup I want.
So for example, instead of this:
<div class="band propertysearch-results">
<section class="layout">
<ul>
<li>
<div><img src="" alt=""></div>
<div>
<h3>Location Name</h3>
<small>123 Leather Lane, London, NW1 123</small>
<p>oremque ad laborum et reiciendis eos quasi odit!</p>
</div>
<div class="results-info">
3 <span>Rooms</span>
View
Save
</div>
</li>
</ul>
Drupal is giving me:
<div class="view viewproerties">
<div class="view-content">
<ul data-thmr="thmr_46">
<li class="">
<div class="views-field views-field-field-photo" data-thmr="thmr_43">
<div class="field-content">
<img typeof="foaf:Image" src="http://findabode.d7/sites/default/files/mvenue1.jpg" alt="" data-thmr="thmr_16 thmr_17 thmr_18">
</div>
</div>
<div class="views-field views-field-title" data-thmr="thmr_43">
<span class="field-content">Leather Lane</span>
</div>
<div class="views-field views-field-body" data-thmr="thmr_43">
<div class="field-content"></div>
</div>
<div class="views-field views-field-field-rooms-1" data-thmr="thmr_43">
<span class="views-label views-label-field-rooms-1">Rooms: </span> <div class="field-content"><span data-thmr="thmr_22" class="devel-themer-wrapper">2</span></div>
</div>
<div class="views-field views-field-view-node" data-thmr="thmr_43">
<span class="field-content">view</span>
</div>
</li>
</ul>
</div>
</div>
So my question is how to I customise the outputted markup and how do I figure out what the variables for each field is called?
Do I make these changes in a tpl file or somewhere else?
Theming the output of views in Drupal is somewhat tricky, depending on the types of fields you have used and the kind of output style you have chosen to create the view.
You will need to learn about Views Templating in order to override the specific templates that your particular view is utilizing to render the output.
In order to customize the output , you need to implement custom template for views , that would override the default rendering of views
If you are creating a view, then views let any theme to overwrite at different levels
Display Output
Style Output
Row style output
Field Content
Here is the quick tutorial on how to theme views
Overriding drupal views
You can also use the Views interface to adapt the markup to what you need:
With the Style Settings you can alter the field markup including its container and label:
Or you can use the Rewrite Results to customize your markup and using tokens for the fields values.
I have been trying to resolve an issue for awhile with rendering of content and the {{currentUser}} check in meteor. A code snippet is below:
{{#if currentUser}}
<div class="sparkline-box side">
<div class="sparkline-row">
<h4 class="gray"><span>Pending Contract Actions</span> 25</h4>
<div class="sparkline big" data-color="gray"><!--28,11,24,24,8,20,26,22,16,6,12,15--></div>
</div>
<hr class="divider">
<div class="sparkline-row">
<h4 class="dark-green"><span>Outstanding Task Orders</span> $43.33M</h4>
<div class="sparkline big" data-color="darkGreen"><!--16,20,6,19,25,22,9,13,7,10,15,4--></div>
</div>
<hr class="divider">
<div class="sparkline-row">
<h4 class="blue"><span>Current Month Actions</span> 45</h4>
<div class="sparkline big" data-color="blue"><!--20,18,21,17,5,7,29,9,8,14,23,8--></div>
</div>
<hr class="divider">
</div>
{{/if}}
With the {{currentUser}} block in place, the text appears, but the sparkline charts do not render in the browser, even when the page is reloaded. If I am not logged in, the text and charts are not visible. The problem is with the rendering of the sparkline charts when wrapped in the {{currentUser}} block. This also happens with other third-party javascript libraries that I am using in the application if wrapped in a {{currentUser}} block. Any thoughts on what may be happening?
Thanks!!
What happens is that meteor re-renders the context when {{currentUser}} changes. It does not preserve any changes made to the DOM by third parties. Read about isolate, preserve and constant. I believe that {{#constant}} will do the trick here.