Article Tagging

8 posts by 2 authors in: Forums > CMS Builder
Last Post: December 22, 2008   (RSS)

Ok, you guys have helped me with every question i've had so far... lets see if you can help with this.

So i have a website that contains 3 different sections.

Main Section
Main Sub Section
Sub Section

I have a News listing manager that when the user will post a News Article I would like the to select what section/sub section this news article should apply to. Similar to tagging the news article.

The Main Section will display all news articles (I have this working fine)
The Main Sub Section would display the news articles based on the Academy they tag the news article with.
The Sub Section would display the news article based on the Location they tag the news article with.

I attached an image with how i have the listing manager set up with the tags.

heres is the test link for the website:

Main Page Section:
apexfinal.highviews.co.cc

Main Sub Page Sections:
apexfinal.highviews.co.cc/futsal_index.php
apexfinal.highviews.co.cc/summer_index.php
apexfinal.highviews.co.cc/goalkeeper_index.php

Sub Section Page: (this page is under construction but will be set up similiar to the Main Sub Pages, except will have the location details, as well as the news that was tagged for this location.
apexfinal.highviews.co.cc/summerlocation_details.php?Philadelphia-PA-2

Let me know if you have any questions!!

Thanks in advance
Attachments:

picture-1_003.png 197K

Re: [s2smedia] Article Tagging

By Dave - December 17, 2008

Hi s2smedia,

Ok, so you want to only show certain records on certain pages? Is that right?

There's two ways you can do this. You can use the built in search engine features here: http://www.interactivetools.com/docs/cmsbuilder/viewer_search.html

And add values to the url to filter results like this:
http://apexfinal.highviews.co.cc/summer_index.php?academy=Futsal+Academy

Or you can hard code it in the viewer code by adding a where option:
'where' => " academy = 'Futsal Academy' ",

Let me know if one of those will work for you.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Article Tagging

Dave,

You are the best!!!! Works like a charm!!!

Re: [Dave] Article Tagging

one last question regarding this..

now how can i code the viewer code to now display articles tagged as Futsal Academy & the location they choose

ex.

'where' => " academy = 'Futsal Academy' ", "futsal_location = "<?php echo $summer_academy_locationsRecord['location'] ?>",

will that work?

the locations pages are set as detail pages. so I would need the location pulled in depending what location they choose.

example:

goto http://apexfinal.highviews.co.cc/summer_index.php

then select a location from the featured location box...
the location detail page (http://apexfinal.highviews.co.cc/summerlocation_details.php) "news" section should now not only show summer academy news but now should filter to news from the location / summer academy...

let me know if you have any questions...thanks!!

Re: [s2smedia] Article Tagging

By Dave - December 18, 2008

Hi s2smedia,

I'm not sure if I understand exactly, but you can try this. You can mix both types of search methods. So if you have a viewer with " academy = 'Futsal Academy' " coded as the where you can link to it like this:

viewer.php?futsal_location=<?php echo $summer_academy_locationsRecord['location'] ?>

And it will filter on both. Let me know if that works for you. In not can you attach your viewer php file so I can see the code?

Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [s2smedia] Article Tagging

By Dave - December 22, 2008

Hi s2smedia,

>so i need the viewer code to be something like this:
>'where' =>"summer_location='<?php echo $summer_academy_locationsRecord['location'] ?>'"

Is $summer_academy_locationsRecord already set or is it being generated by the same getRecords() call? In any case, here's how to do that:

'where' => "summer_location='" .mysql_real_escape_string($summer_academy_locationsRecord['location']). "'",

Hope that helps! Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Article Tagging

PERFECTO!!

Thanks again