Page title with coranto

Is Coranto not working properly for you? Here's where to ask for support help; for best results, follow these steps:
  • - Check your core/addon documentation for possible solutions
  • - Search these forums for similar problems that have already been solved
  • - If you're still stumped, check out THIS TOPIC, and post your question in this forum!!

Moderators: Spunkmeyer, Dale Ray, SrNupsen, Bluetooth, Jackanape

Page title with coranto

Postby Spalace » Sat Oct 13, 2007 9:24 am

I run a news site and would like to be able to use the subject of the news item as the page title.

I looked at the profiles and saw you can change the HTML page title so I put in <Field: Subject> rebuilt the news but that didn't work.

I've see it done on the "Pro Football Critics" site

http://www.pfcritics.com/news101/BrownsWinslowUncertainforR.php

Can anyone point me in the right direction.

Thanks
Spalace
 
Posts: 36
Joined: Tue Feb 20, 2007 8:52 am
Location: London

Postby SrNupsen » Sat Oct 13, 2007 12:34 pm

Changing the HTML page title like you did is only available if you use templates.

If you want the title of your HTML page to change with each item, you'll have to either use templates OR use a Maginot static profile with the whole HTML inside the style, from <html> to </html>
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Spalace » Sun Oct 14, 2007 3:05 pm

Sorry I should have given more information in the first post. I do use a template for the news.

Do I need to do anything in the template so the page title will work?
Spalace
 
Posts: 36
Joined: Tue Feb 20, 2007 8:52 am
Location: London

Postby NitroX_infinity » Sun Oct 14, 2007 4:33 pm

Doesn't viewnews.tmpl do this with <Field: Title> ?
User avatar
NitroX_infinity
 
Posts: 371
Joined: Fri Apr 04, 2003 7:36 pm
Location: The Netherlands

Postby SrNupsen » Sun Oct 14, 2007 4:43 pm

NitroX_infinity wrote:Doesn't viewnews.tmpl do this with <Field: Title> ?


Correct, but he didn't say whether he's using viewnews.cgi or Maginot static files for his news.
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Spalace » Sun Oct 14, 2007 8:16 pm

been a slow day after recovering from the Rugby...

I am using Maginot static files
Spalace
 
Posts: 36
Joined: Tue Feb 20, 2007 8:52 am
Location: London

Postby SrNupsen » Sun Oct 14, 2007 9:45 pm

If you use a template for your Maginot static files, you can indeed use <Field: Title>

The advantage of the other method I mentioned (put the whole HTML from <html> to </html> inside your style) is that this will give you access to all Coranto fields within your style (in a template you don't have that)
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Spalace » Tue Oct 16, 2007 1:02 pm

Thanks for your help.

I've put the whole HTML in the style now. Works a treat. It's very helpful as i've implemented a breadcrumbs system which uses the page title.

http://www.superpalace.co.uk/news/Symonsstepsdown.asp

:D [/url]
Spalace
 
Posts: 36
Joined: Tue Feb 20, 2007 8:52 am
Location: London

Postby SrNupsen » Tue Oct 16, 2007 1:13 pm

Just out of curiosity: Did you do your breadcrumbs system yourself or did you find it somewhere? I'm looking for a decent system myself...
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Dale Ray » Tue Oct 16, 2007 1:16 pm

<Field: Title> is replaced by the text specified on the profile settings page.

If you are using viewnews.cgi to display the news item you can create a blank template for viewnews.cgi to use. This is just a file with nothing in it. Since viewnews.cgi only displays one item at a time you can then use the style to create the entire html page. You end up with something like this for a style:

Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>
   <title><Field: Subject></title>
</head>

<body>
Your content here. Can be any valid style stuff!


</body>
</html>


Doing this allows you to use any Coranto field or combination of fields in the title or meta tags of the page that is created.

Remember you can specify the template to use when calling viewnews.cgi so your link could look like this:

Code: Select all
viewnews.cgi?id=<Field: newsid>&style=YourStyle&tmpl=EmptyTemplate


I usually delete the contents of the default viewnews.tmpl file when I do a Coranto install and only use the style to format items viewed with viewnews.cgi. You can always specify a template to use in the URL calling viewnews.cgi if you need one. You can also change the default template by editing viewnews.cgi.

This technique creates dynamic pages, each time a user wants to view the page the server processes the newsitem through the style and the page is created 'on the fly'. If you want static pages you can use the Maginot addon to create a page for each item using a static page profile. You use the same technique as above, do not specify a template in the profile settings and then put the code to create the entire page in the style you use.
Dale Ray
User avatar
Dale Ray
 
Posts: 1004
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby Spalace » Tue Oct 16, 2007 1:20 pm

SrNupsen wrote:Just out of curiosity: Did you do your breadcrumbs system yourself or did you find it somewhere? I'm looking for a decent system myself...


No, I found this on the net through webmonkey. The link is http://duvinci.com/projects/javascript/crumbs/

To get the page titles included in the breadcrumb system use version 101.
Spalace
 
Posts: 36
Joined: Tue Feb 20, 2007 8:52 am
Location: London

Postby SrNupsen » Tue Oct 16, 2007 3:38 pm

OK thanks - I'll check it out.
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway


Return to Troubleshooting

Who is online

Users browsing this forum: No registered users and 2 guests

cron