close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Adding a news headline to the meta-title

Thread began 3/20/2012 12:51 pm by JamieEff | Last modified 4/05/2012 4:39 pm by Jason Byrnes | 1114 views | 13 replies |

JamieEff

Adding a news headline to the meta-title

Hi guys

Ray helped me set up a news page list which is now working great (thanks Ray!) and I was just wondering, when the visitor click on the news item to go and read the entire article, is there anyway to add the news headline into the meta-title.


Thanks

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

add the developer notes for the News title content area to the title tag of the page.

Sign in to reply to this post

JamieEff

Thanks Jason - I did think that after I posted but wanted to make sure.

Cheers

Jamie

Sign in to reply to this post

JamieEff

That's not working, or at least what I *think* you're saying isn't working...

Set up is as follows:

News.php - lists all the news articles by
Date and title
'more..' link clicks through to relevant full article on newsitem.php

In backend, zzNews template set up with Title, Content and Date areas

I have added the following with no joy:

<title<?php
include('WA_CMS/addtosite.php');
echo WA_getCMSContent($database_PowerCMSConnection, $PowerCMSConnection, 'zzNews', 'Title', false);
?></title>

Have tried different permutations as well with no joy

Cheers

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of the page please.

Sign in to reply to this post

JamieEff

Just skyped it to you

Sign in to reply to this post

JamieEff

Figured it out... Thanks for your help though. Was a missing >

Sign in to reply to this post

Jason ByrnesWebAssist

glad to hear it is working

Sign in to reply to this post

JamieEff

Originally Said By: Jason Byrnes
  add the developer notes for the News title content area to the title tag of the page.  



Is there any way to strip out the <p> tags that automatically get put in just so that they dont show in the title?

I know I can disable <p> entirely, but I only want to strip them out for that particular element?

Thanks

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

yes, you can change this code:

php:
echo WA_getCMSContent($database_PowerCMSConnection, $PowerCMSConnection, 'zzNews', 'Title', false);



to:

php:
echo str_replace(array("<p>","</p>"),"",WA_getCMSContent($database_PowerCMSConnection, $PowerCMSConnection, 'zzNews', 'Title', false));
Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...