Home | Products | Consulting | Hosting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
SEO URLs Getting Odd Results

 

 


InHouse
User

Feb 21, 2008, 1:32 PM

Post #1 of 6 (599 views)
Shortcut
SEO URLs Getting Odd Results Can't Post

Hi again,

Situation:
One PHP file with 1 list view showing archive of Topic X and one page view which defaults to showing Record #1 of Topic X with content.

Goals:
1 - Clicking a link from the list view should reload the same page and display the selected article (replacing Record #1).
2 - The default record on the page should be the most recently published Topic X article available (but not one set for a future release date).

Issues:
1 - With $options['useSeoUrls'] = ''; all works normally.
When $options['useSeoUrls'] = '1'; things go weird. The page reloads with the correct article displayed, but all linked CSS files are ignored.

2 - Having trouble getting the most recent article of Topic X to display. Can you please point me in the right direction?

Many, many thanks are anticipated.

Jayme


Dave
Staff / Moderator


Feb 21, 2008, 2:19 PM

Post #2 of 6 (596 views)
Shortcut
Re: [InHouse] SEO URLs Getting Odd Results [In reply to] Can't Post

For the CSS, check if they're relative links. If you make them absolute urls (starting with "/" or "http://" they should work). The issue is that because the SEO urls have slashes (/) in them it's as if those files are in a subdirectory.

So if you have an url like this:
viewer.php/my_article_title-1/

A css tag like this:
<link href="css/style.css" ... />

Would look for the css here (instead of where it should)
viewer.php/my_article_title-1/css/style.css

Adding "/" or "http://" to the beginning of the css href will fix that.

Hope that makes sense.

>2 - Having trouble getting the most recent article of Topic X to display. Can you please point me in the right direction?

Do you have a sample url where you're trying to do this?

What is the topic field and a value you want to search for?

You can either limit the results of the list viewer by specifying search criteria in the url like this: listViewer.php?topic=sports or by hard coding it in the 'where' option like this: $options['where'] = 'topic = "sports"';

Hoe that helps, let me know if you need more details.

Dave Edis - Senior Developer
interactivetools.com


InHouse
User

Feb 22, 2008, 9:13 AM

Post #3 of 6 (591 views)
Shortcut
Re: [Dave] SEO URLs Getting Odd Results [In reply to] Can't Post

Hi there,

The CSS stuff will be fixed shortly. Thanks for the lead on that. I do everything with relative links and sometimes forget that there are other ways of doing things. Blush This site will move to a new server for production so I'm just going to have remember to change the absolute paths.

The Topic issue: My client has a repeating pattern of Tips pages for several site areas (Nutrition, Wellness, Non-smoking, etc.). I'm trying to have all the Tips in one Section Editor where they will select which site area (Topic) their tip belongs to.

I'd like to show the most recent published article for that topic by default. Then, the user will have a list of other articles by linked headline, also from that topic. Clicking one of those headlines will replace the default article. This should all happen on one page.

This is something that we're going to have repeat several times for this site so if I can find a reliable and efficient pattern to minimize the number of Section Editors they need, then we win.

Cheers,
Jayme


(This post was edited by InHouse on Apr 16, 2008, 7:06 AM)


Dave
Staff / Moderator


Feb 22, 2008, 1:21 PM

Post #4 of 6 (581 views)
Shortcut
Re: [InHouse] SEO URLs Getting Odd Results [In reply to] Can't Post

Ok, there's probably a few different ways to do it. One way would be as follows:

Have one section for tips. Have a list dropdown field for "category".

Create a seperate page for each category (eg: nutritiontips.php). They'd have almost the same content, but it will be easier to customize page headings and so on.

Have two list viewers on your page. With nutritiontips.php for example, one list viewer would list all the tip links (the menu) and the other the content for the tip.

For the menu list viewer, use these options:


Code
$options['viewerUrl'] = 'nutritiontips.php'; 
$options['perPage'] = '9999';
$options['pageNum'] = '1';
$options['orderBy'] = 'date DESC';
$options['where'] = 'category = "nutrition"';


The idea is that it will list ALL the tips, sorted by date (newest first - you can sort them however you want), but only list tips in the nutrition category.

And for the content viewer, use these options:


Code
$options['perPage']   = '1'; 
$options['pageNum'] = '1';
$options['orderBy'] = 'date DESC';
$options['where'] = 'category = "nutrition"';

$num = getNumberFromEndOfUrl();
if ($num) { $options['where'] .= " AND num = '$num'"; }


Where this will list the newest tip from the nutrition category -OR- the tip number specified from the nutrition category.

Would that do everything you need? Let me know if I can provide more details.

Dave Edis - Senior Developer
interactivetools.com


InHouse
User

Feb 22, 2008, 1:47 PM

Post #5 of 6 (581 views)
Shortcut
Re: [Dave] SEO URLs Getting Odd Results [In reply to] Can't Post

So glad to have this validation Dave. Thanks to your help and a few other threads I've done pretty much as you described.

Two variations on a theme:
http://www.cinderblaze.com/mlhu/nutritiontips.php
1 tip at a time with a list of past tips

http://www.cinderblaze.com/mlhu/news.php
Many posts with an anchor list. The next trick there will be to see what happens when we roll to the next page... My problem to solve.

Best wishes,
Jayme


Dave
Staff / Moderator


Feb 25, 2008, 11:40 AM

Post #6 of 6 (542 views)
Shortcut
Re: [InHouse] SEO URLs Getting Odd Results [In reply to] Can't Post

Looking good, nice work! :)

Dave Edis - Senior Developer
interactivetools.com

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Hosting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4