This topic is locked

Dynamic title on view page

11/12/2008 12:42:54 PM
PHPRunner General questions
N
nicolagrimshaw author

Hi
In the previous version of PHPRunner I was sucessfully able to insert title (and other meta data) using the following

<TITLE>{$show_title}</TITLE>


This no longer works in 5.0
I figured the code may now be

<TITLE>{$title_value}</TITLE>


but this does not work either - any ideas?
Thanks in advance

J
Jane 11/13/2008

Hi,
It's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with instructions on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.

bbarker 11/15/2008

Hi,

It's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with instructions on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.


SOLUTION?

PLEASE post the result here. I have a similar need to set some variables, like title, name, etc and I want to be able to print those in a report in place of an existing fixed name/field.

Sergey Kornilov admin 11/15/2008

Template file:

<TITLE>{$mytitle}</TITLE>


BeforeDisplay event:

$xt->assign("mytitle","My Dynamic Title");
bbarker 11/16/2008

Cool... works good. Can you push me just a little bit more?
How can I replace the "My Dynamic Title" value with a field from a separate table?
If I add a new table with field called "EventTitle", I'd want the contents of the "EventTitle" to print at the top of my report.
This way differnet people can use the application and insert their own information into the reports.
My intended use is to allow data to be entered into a bunch of fields: Title, Date, Contact, Message, etc

and then use these in a printed report that is used as a "registration acknowledgement form".
------------------

Many thanks for your continued assistance. Once again, I need to let you know how STABLE version 5 is. It's really great!

J
Jane 11/17/2008

Bill,
here is a sample:

global $conn;

$str = "select Title, Date, Contact, Message from EventTitle where UserName='".$_SESSION["UserID"]."'";

$rs = db_query($str,$conn);

$data = db_fetch_array($rs);

$title = $data["Title"]." ".$data["Date"]." ".$data["Contact"]." ".$data["Message"]." ";

$xt->assign("mytitle",$title);



where UserName is your actual field name where login name is stored.

bbarker 11/17/2008

Excellent.... exactly what I needed.... Thanks!!!!!!