Can variables in the content of a template be replaced with values in the new page?
When I create a page from a template, I'd like strings like $TITLE, $DATE, $USER, etc. in the template content to be replaced with the corresponding values in the content of the new page. Is there a way to do this already, or can such a feature be added?
Thanks!
Thanks!
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Get Satisfaction loves Zappos because they care about customer service.
-
Inappropriate?Hmm, this is an interesting thought. I don't know if we have any way to do this now, but on the templates I created, I just kind of outlined what I wanted to go where, and filled in the data as I went along.
I can understand why you would want to have variables like Date and user, but why title? Isn't that already at the top of the page?
I'll pass this along as a feature request though. Hmm, now that I think about it, you might be able to create a plugin or something that might do the job.
I’m off to go think about this
-
Inappropriate?In my days of PBwiki hackery, I once created something like this as a 3rd party plug-in kinda thing, but it was too buggy and with the huge mix of WikiStyle code and Point&Click HTML code, it was just too awkward to be useful. However, I wonder if something like this would be more useful implemented as an "Insert" button on the editor toolbar, so you could insert the current date, or your username, or something like that.
Hm.
I’m thinking too
-
Inappropriate?Look at breviary.pbwiki.com. Each page is named for a date of the year, like 0308 is March 8. On that page, I want a pointer back to 0307 and a pointer forward to 0309. I'd show what this looks like, but getsatisfaction doesn't seem to like funky characters in their messages.
So what I'd really like is to be able to put some code in the template that would get evaluated into values that would then be inserted into the new page. I'd like to have a variable that returns the title (0308) that I could then split it into its pieces (03, 08), and subtract one from the day (07), and stick them back together to get the previous pointer (0307).
Don't know if this would be doable. Thanks for listening.
I’m thankful for the positive repsonse
-
Inappropriate?Actually, the simple case you describe in your example can be handled with Javascript. Unfortunately, 2.0 restricts Javascript code to the "HTML Plugin", which makes it very impractical to use. Perhaps a highly motivated staffer can whip something up for you.
-
Inappropriate?Thanks for the Javascript suggestion. I hadn't thought of that. I'm still using 1.0 and it's working fine!
I’m happy
Loading Profile...





