I'm getting close on this....
ok, I created a new php file named tags.php and I'm trying to get the content filter by tag.
So, on my details page I've this code:
<?php foreach ($viajesRecords as $record): ?>
<?php $tagList = explode(',', $viajesRecord['tags']); ?><?php sort($tagList); ?>
<?php foreach ($tagList as $tagLink): ?>
<a href="tags.php?tags_keyword=<?php echo $tagLink ?>"><?php echo $tagLink ?></a>
<?php endforeach ?>
<?php endforeach ?>
My tags field, contains keywords comma separated, so I'm displaying for this particular case 3 tags on this record (Cancun,All Inclusive,Family)
Now, my url looks like this: http://mydomainname.com/viajes/tags.php?tags_keyword=Cancun
On my tags.php page I've this code:
<?php
// load viewer library
$libraryPath = 'cms/lib/viewer_functions.php';
$dirsToCheck = array('/chroot/mypath/html/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
?>
<script LANGUAGE="JavaScript">
<!--
var tags_keyword =document.location.search.replace('?tags_keyword=', '');
document.getElementById("tagkeyword").value= tags_keyword;
//-->
</script>
<?php
// load records from 'viajes'
list($viajesRecords, $viajesMetaData) = getRecords(array(
'tableName' => 'viajes',
'perPage' => '6',
'loadUploads' => true,
'allowSearch' => false,
'where' => "tags='tagkeyword'",
));
?>
This way I'm passing the variable from one page to another and now I think I can do the filter. However, my tags field contains 3 words (comma separated as mention it before).
Am I'm heading to the right direction? Thanks in advance for your help!
Jesus