Questions tagged [partials]

Partials are often synonym for templates, which can even also be called partial templates.

Partials are often synonym for templates, which can even also be called partial templates.

763 questions
6
votes
1 answer

Undefined Local Variable or Method `f' In a view partial

This seems like such a stupid, easy fix (it probably is) but I've been searching SO and other areas on the web with no luck. I'm getting an undefined method local variable error 'f' within my partial used in my view. I'm assuming that the "do block"…
Edward
  • 245
  • 1
  • 4
  • 12
6
votes
0 answers

Using Dynamic Partials in Handlebars

I'm trying to use dynamic partials in Handlebars, using Gulp and gulp-compile-handlebars. I've seen this roll-your-own solution but I believe that Handlebars now supports dynamic partials out of the box, however I don't understand what the…
Frank Furter
  • 508
  • 1
  • 6
  • 15
6
votes
1 answer

MustacheJS rendering nested JSON using partials

I am trying to render my nested(can be multiple level) JSON using Mustache partials. It renders only till second level it does not third & greater. As per definition partials can be used to render recursively. Am I doing it wrong ? or is there any…
Darshan
  • 750
  • 7
  • 19
6
votes
1 answer

How to handle header and footer with AngularJs

I'm very sorry If I don't explain myself very well, so here goes. Basically I'm having trouble trying to work this issue out. I am using Yeoman to generate my angular project. I have a header and footer, footer will be static and header will need…
Sananes
  • 131
  • 2
  • 9
6
votes
2 answers

Why ng-scope is added to javascript inline of my partial view and makes alert not working?

I'm using AngularJs with templating system. I want to add specific inline javascript script to each template adding alert box regards to the selected tab ( Home | List | Settings ) Html renders : but ng-scope is added and nothing alerts when you…
Julien DES
  • 113
  • 1
  • 8
6
votes
2 answers

How to render a view inside of another view (rails 4)

Hi I want to preface this by saying that I am new to coding. I have an issue that I believe can be solved in two ways A. by rendering a partial B. by updating the controller ( I can totally be wrong but these are what I suspect lol) I have two…
Alicia T. Glenn
  • 107
  • 1
  • 1
  • 6
6
votes
1 answer

Reloading partials Handlebars

I'm quite new to programming and especially to handlebars. I have a div loaded with combination of jquery and handlebars in my html file. I have tabs on top of it. I want to reload all the content to a new one when there is a click on a tab. The…
Ambroise Collon
  • 3,839
  • 3
  • 18
  • 37
6
votes
1 answer

rails html helper

I'm trying to figure out the cleanest way to generate a bit of html AND nest content inside it. Using HAML. Basically I want to do something like: = block_large This is some nested content And that should generate:
devth
  • 2,738
  • 4
  • 31
  • 51
6
votes
2 answers

Rails No route matches {:controller=>"devise/products"}

I get the below error on my rails application when I try to login or register (I'm using the Devise GEM for logins). Routing Error No route matches {:controller=>"devise/products"} All the source code for the application can be found here:…
Holly
  • 7,462
  • 23
  • 86
  • 140
6
votes
1 answer

Railstutorial: Putting flash messages in partial yields error "undefined method `each' for nil:NilClass"?

Possible Duplicate: Flash Messages in Partials (Rails 3) I am doing Michael Hartl's Railstutorial and listing 7.26 adds flash messages to the application layout: . . . <%= render 'layouts/header' %>
6
votes
2 answers

How to use the partial in zendframework2

In ZF1 we use partial in layout.phtml file something like that $this->partial('header.phtml', array('vr' => 'zf2')); How we can do the same in ZF2?
Developer
  • 25,073
  • 20
  • 81
  • 128
6
votes
3 answers

Partials in lithium

Normally I use the Zend Framework and this is something I miss in Lithium. Partials. There is a render method in the view where you can use 'elements' which is the closest I got. _render('element', 'form); ?> This does work, however it…
Matthijn
  • 3,126
  • 9
  • 46
  • 69
5
votes
2 answers

Rails 3 render partial from another controller (error: ActionView::MissingTemplate)

I'm trying to include a login (username / password) in the header of my application.html.erb. I am getting this error: Missing partial /login with {:handlers=>[:rjs, :builder, :rhtml, :erb, :rxml], :locale=>[:en, :en], :formats=>[:html]} in view…
botbot
  • 7,299
  • 14
  • 58
  • 96
5
votes
1 answer

Nodejs EJS partials with scripts in the head

I'm working with EJS to render and server HTML pages from a Nodejs server. Some of the partials I include have scripts and stylesheets referenced in the head, but this causes the client to make multiple requests for the same file (for example if the…
bigpopakap
  • 381
  • 5
  • 13
5
votes
1 answer

Render partial located in child directory in Phoenix

If a partial is in the same folder as another .eex file, you can just run render "filename.html", but what if it's in a subfolder? In my case, I have a bunch of partials containing the HTML for some SVG icons. I don't want those files cluttering up…
neurodynamic
  • 4,294
  • 3
  • 28
  • 39