Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.

Name:
Email:
Subject:
Message icon:

Attach:
(Clear Attachment)
(more attachments)
Allowed file types: gif, jpg, png, txt, tpl, lng, ini, pvd, psf, ini, cfg, csv, zip, xml, pas, 7z
Restrictions: 4 per post, maximum total size 1024KB, maximum individual size 1024KB
Note that any files attached will not be displayed until approved by a moderator.
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What is the best video database software?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: daddydave
« on: September 04, 2010, 12:42:13 pm »

Perfect, I was going to ask you if there was anyway to get rid of the last comma without having to use Javascript, but then I decided to use · instead of a comma, so it doesn't matter. Thanks again, Nostra.

Posted by: nostra
« on: September 03, 2010, 10:56:39 pm »

Adding a comma after {%value} should, actually do the trick.

If you use {%param=name}, then you need to call the field in the main templates with
Code: [Select]
params="full"
Posted by: daddydave
« on: September 03, 2010, 09:27:59 pm »


In the main template, I have
{%value=actors  maxvalues="3" template="ddlist\actor.ptm"}

In the subtemplate, I have
{%param=name}

This results in me seeing output to the effect of:
Quote
<strong>(IMDB Rating:6.3) Actors: {%param=name}{%param=name}{%param=name}  Director: Robby Grewal</strong>

If I change the subtemplate to {%value}, it displays the actors names instead of the {%param=name} code but I am not sure how to get commas in there because the built-in templates seem to have no problems displaying commas in between the actors and I can't figure out how they do it.
Posted by: rick.ca
« on: September 01, 2010, 09:43:40 pm »

Quote
BTW I have noticed for a while that I have some of the ptm files from Plugins\Templates folder duplicated in Plugins folder itself. Is this normal or did I screw something up downloading extra templates from the forum into the wrong folder?

I noticed the same thing recently, and wondered how I managed to do that. I wonder if the automatic updater put them there.
Posted by: daddydave
« on: September 01, 2010, 09:31:45 pm »

One other thing, I was going to try to figure out this on my own using the existing templates as examples, but I am quite stumped.

I got it to work just as you said above using a subtemplate if the subtemplate contains only {%value} but this smashes the list of actor names up together without spaces. And if I do so much as put a comma to the right, I end up seeing the actual code {%value} in the output (along with the comma). I tried putting in some things in the main template as well, but without really understanding. So my new question is: is there an easy way to make it show commas in between the names?

Thanks again for all advice.

BTW I have noticed for a while that I have some of the ptm files from Plugins\Templates folder duplicated in Plugins folder itself. Is this normal or did I screw something up downloading extra templates from the forum into the wrong folder?
Posted by: daddydave
« on: August 31, 2010, 10:21:38 am »

Thanks, nostra!
Posted by: nostra
« on: August 30, 2010, 11:09:50 pm »

You need to create a separate template file for the values and then use the following syntax in main template:
Code: [Select]
{%value=actors template="pages\actor.ptm" maxvalues="3"}
Posted by: daddydave
« on: August 27, 2010, 06:40:33 pm »

I'm starting to piddle around a little with templates. I am trying to get a template to display only the first 3 actors for the movie but it is displaying the whole list. I must have something wrong.
Code: [Select]
{%value=actors maxvalues="3"}
The whole line for that is:
Code: [Select]
<p><strong>(IMDB Rating:{%value=imdbrating}) Actors: {%value=actors maxvalues="3"}  Director: {%value=directors maxvalues="1"}</strong> {%value=description} </p>
anything