Situation:
I am writing a basic templating system in Python/mod_python that reads in a main HTML template and replaces instances of ":value:" throughout the document with additional HTML or db results and then returns it as a view to the user.
I am not trying to replace all instances of 1 substring. Values can vary. There is a finite...
It appears that if you just use Html.DisplayFor(model => model) with no templates for a Details view, the resulting markup will look something like this:
<div class="display-label">first name</div>
<div class="display-field">Dan</div>
<div class="display-label">last name</div>
<div class="display-field">M</div>
<div class="display-label...
I want to streamline the process by which I create static websites.
I want to avoid having to do multiple editing operations when I have to change one page element, like the text or image in a footer.
I want to be able to use my tool on a local computer, in order to upload the resulting structure to my server.
I don't want to use a to...
I'm a perl developer and I've compiled a list of push-style templating systems:
http://perlmonks.org/?node_id=674225
Where push-style is defined in terms of Terence Parr's seminal paper on the topic:
http://perlmonks.org/?node_id=674225
What is the best place to discuss such systems?
...
Does anyone know any templating engine that works under .NET Compact Framework 3.5?
...
I am trying to create a template that will put items in a table.
Controller:
items = Item.all().order('name').fetch(10)
template_values = {'items': items,
'headers': ['Name', 'Price', 'Quantity']}
render('Views/table.html', self, template_values)
Template:
<table>
<tr>
{% for header in headers...
Hey all,
I'm trying to do some templating optimizations and I'm wondering if it is possible to do something like this:
function table_with_lowercase($data) {
$out = '<table>';
for ($i=0; $i < 3; $i++) {
$out .= '<tr><td>';
$out .= strtolower($data);
$out .= '</td></tr>';
}
$out .= "</table>";
...
Currently I am doing this:
I have text that looks like:
Hello ${user.name}, this is ....
And I do this:
public string TransformUser(User user, string text)
{
StringBuilder sb = new StringBuilder(text);
sb.Replace("${user.name}", user.Name);
...
...
return sb.ToString();
}
Is there a better way, maybe using reflection ...
I'm currently building a Javascript library that can be used to easily create embeddable media based on the URL of a media file, and then be controlled using Javascript methods and events (think something like the Flash / Silverlight JW player).
Of course, i could simply cat all the html tags from the Javascript library and send that t...
Hey all,
I'm building a templating system and I'm running in to an issue with calling functions on the fly.
When I try the following:
$args = array(
4,
'test' => 'hello',
'hi'
);
You know.. some numerical elements some associative elements,
call_user_func_array($function, $args);
converts the array to something like ...
That's an HTML templater, not a php templater, not java or whatever.
I am looking for something like HAML for PHP. I tried the 2 projects for PHP, PHAML and PHPHaml both of which are suffering from serious bugs.
Do you know of any good html templater out there, preferably for PHP?
EDIT I''m looking for something that can turn this
<...
Hey all,
This requirement is just for simplicity for developers and beautiful code. I'm building a template system and I really would just like an object variable to simply be there in all functions. Here's some code:
Librarian.php:
$class = "slideshow";
$function = "basic";
$args = array(...);
$librarian = $this; // I WOULD LIKE THIS...
Hello
I am using PHPSavant templating system for a project and I am not sure how to use ob_start in this.
I have tried before .. for example,
page_header.php
-- ob_start();
page_footer.php
-- ob_end_flush();
But because now I am using a templating system.. am not sure where to put these function.
$template = new Savant3();
$templ...
Say I have some data in MySQL or a big ole CSV file. I also have a report. It's a PDF, call it 100 pages long. I need to generate variations on this PDF for slices of the data. More specific example:
I have a CSV file with each StackOverflow user in a row and each column contains various statistics about that user.
I have a report ...
Hi,
I am thinking about implementing a templating engine using only the plain C#/.NET 4 syntax with the benefit of static typing.
Then on top of that templating language we could create Domain Specific Languages (let's say HTML4, XHTML, HTML5, RSS, Atom, Multipart Emails and so on).
One of the best DSLs in .NET 4 (if not only one) i...
I cant figure out whats wrong. Its working when i tried to refresh only topics but it doesnt works when tried to refresh topics and page-links. ie. topics table's refreshing, and 'pagelinks' disappearing, i thought pure cannot reach - read second template node.
By the way, i tested their code, first message box show up all of nodes - in...
Hello.
I'm writting a script to automate creating configuration files for Apache and PHP for my own webserver. I don't want to use any GUIs like CPanel or ISPConfig.
I have some templates of Apache and PHP configuration files. Bash script needs to read templates, make variable substitution and output parsed templates into some folder. ...
Hey all,
I've had a question that I've been wondering for a while. I'm making a templating system for front-ends where tags are interpretted (like Smarty). I was wondering if there is value in having the tags be able to communicate with the HTML document and other "Smartyish" tags. I was hoping that the community would have some thought...
Say I need to have a templating system where a user can edit it online using an online editor.
So they can put if tags, looping tags etc., but ONLY for specific objects that I want to inject into the template.
Can this be made to be safe from security issues?
i.e. them somehow outputing sql connection string information or scripting t...
Hi,
While I'm fine with standard control styling in silverlight I have recently began using more dynamic methods of fetching data to be displayed in items controls. One of the controls I am reworking is a collection of links.
The issue I am having is that each link is coloured differently when moused over. One red, one blue, one green,...