Questions tagged [view-templates]

25 questions
0
votes
1 answer

I am trying to use handlebars but while rendering in server.js file its always showing me res.render is not a function in browser

const express = require('express'); const dotenv = require('dotenv') const morgan = require('morgan') const bodyparser = require('body-parser') const path = require('path'); const app = express(); dotenv.config({path: 'config.env'}) const PORT =…
0
votes
5 answers

How to pass additional variables into a function which calls include

I'm trying to make a simple template system in PHP. I'm new to PHP, so it's nothing serious. I have some problems though: A regular include works: $variable = "test"; include("templates/news.html"); But this won't: This says $variable is…
Mulle
0
votes
1 answer

How can I use an image instead of a shape for a node in graph view in Soley Studio?

I am setting up my graph view template in Soley Studio. In some pre-installed solutions I saw that nodes in graph view have been visualized with an icon or graphic instead of a circle, rectangle, etc. I want to define my properties for a node class…
hnnes
  • 17
  • 6
0
votes
1 answer

Cakephp 3.0 how to create files for URL like domain.com/Products/Category1/Sub-Category1/1

Im new with CakePhp. I understand how to create .ctp files in folder structure to have a URL navigation as domain.com/HW_Products/1 domain.com/HW_Products/2 domain.com/SW_Products/1 domain.com/SW_Products/2 But I have many categories in my…
Varun Rao
  • 781
  • 1
  • 10
  • 31
0
votes
2 answers

Play Framework 2.4 how to use return statement in Action controller

is there a way to return a value inside Action controller. I have a method in my User model which returns the number of friends of a given user. def nrOfFriends(current_user: Long): Int = { DB.withConnection{ implicit connection => var…
Hkt
  • 65
  • 1
  • 7
0
votes
1 answer

Why do we have to use View Templates such as Jade, EJS and Hogan on server side??

I'm learning node.js thesedays and new to back-end. One thing that I'm confused is why do we have to use View Templates? Why don't we just use HTML form on server side?
KimCrab
  • 2,231
  • 4
  • 15
  • 20
0
votes
2 answers

A more DRY way to show/hide partials/template in rails

Usually the recommended solution is content_for in the parent layout file. But this results in having to specify it in every view since the default becomes not displaying it if the content is not present in the child view partial. For example, if I…
ahnbizcad
  • 10,491
  • 9
  • 59
  • 85
0
votes
1 answer

ASP.NET MVC template with webgrid instead of table

Is there a Asp.net MVC View Template that uses WebGrid instead of a ?
0
votes
1 answer

How to model nested resources using RABL?

I want to setup a nested route in my Rails project as illustrated here: # config/routes.rb DemoApp::Application.routes.draw do namespace :api, defaults: {format: :json} do namespace :v1 do resources :places, only: [:index] …
JJD
  • 50,076
  • 60
  • 203
  • 339
0
votes
1 answer

CakePHP - View Template - default values for fetched content?

This is the example in the book, of a simple View Template // app/View/Common/view.ctp

fetch('title'); ?>

fetch('content'); ?>

Related actions

1
2