ActionsDev

3 replies to this thread. Most Recent

David Owen

7 May 2008, 2:48 pm

PHP Dynamic Page Titles Action

Is there an action for putting a short line of PHP code into the Freeway page title but keeping the freeway pages named correctly?

The PHP Dynamic Page Titles Action nearly works but assumes your just putting in a single variable name, not the full code <?... ...?>

Is there anything?

quote

www.ineedwebhosting.co.uk

Freeway Friendly web hosting and Domain Names.


PrintlineAdvertising.co.uk

Web Design & Web Hosting, Print Design, Digital and Litho Printers .

thatkeith

7 May 2008, 4:10 pm

Sometime around 7/5/08 (at 10:48 -0400) ineedwebhosting said:

The PHP Dynamic Page Titles Action nearly works but assumes your just putting in a single variable name, not the full code <?... >...?>

Off the top of my head - have you tried putting your PHP code into a variable, just as a workaround at least?

k

quote

David Owen

7 May 2008, 4:53 pm

Yes, I can do it that way, marginally quicker to paste the code in one action field, rather than split around the Freeway document, (I’ve got to call the variable first not just name it in the action) and as I’ve got to re-visit this on a few documents and pages.

But never looked into actions before

Need to change this line

    //  Create the string for the title tag
    var myString = '<?PHP print"$' + fwParameters[ "title" ] + '"; ?>';

so it just puts the field contents in the action

But just typing this - I guess has concentrated my mind into knowing what to do… as I can wrap the extra code I want, around the variable i’m using.

And re-name the action for just the use I want.

On 7 May 2008, at 17:10, Keith Martin wrote:

Sometime around 7/5/08 (at 10:48 -0400) ineedwebhosting said:

The PHP Dynamic Page Titles Action nearly works but assumes your just putting in a single variable name, not the full code <?... >> ...?>

Off the top of my head - have you tried putting your PHP code into a variable, just as a workaround at least?

David Owen Freeway Friendly Web hosting and Domains :: (Test Drive a web hosting account for Free) www.ineedwebhosting.co.uk www.printlineadvertising.co.uk/freeway

quote

www.ineedwebhosting.co.uk

Freeway Friendly web hosting and Domain Names.


PrintlineAdvertising.co.uk

Web Design & Web Hosting, Print Design, Digital and Litho Printers .

Back to Top

Mike B

7 May 2008, 6:58 pm

Why not set it to a variable in the Before HTML and set that variable in the action.

<?php
$page_title = ' - This Is Another Page ' . $some_value;
?>

Then set page_title into the action field.

BTW, There is an a version of this action I updated so a variable can be used with an existing title (before or after).

www.easibase.com/freeway/freewayactions.php

Mike

On May 7, 2008, at 4:48 PM, ineedwebhosting wrote:

Is there an action for putting a short line of PHP code into the Freeway page title but keeping the freeway pages named correctly?

The PHP Dynamic Page Titles Action nearly works but assumes your just putting in a single variable name, not the full code <?... ...?>

Is there anything?

quote

Freeway, PHP and MySQL examples

www.easibase.com

FreeCounter