I am working on www.eljakim.nu
and if you look at the home page you see a picture behind a frame you see a title below the frame and som info in the left column
i need a way to have thos 3 items (paired they belong togetter) to be random (or atleast alternate) like the random image snipped does but now it must be done in a way that those 3 items that need to be togetter (name below the picture is name of the picture and text is a intro of the article aubout this picture) stay togetter when the change happends.
the way to enter those info could be done by making a new document containing those tv’s and maybe make a snippet that randomly or in order shows a nother page from a list of pages (maybe a folder containing those pages like the news snippet?)
that way it would be easy just greate a bunch of home pages and the random page snipped would do the rest.
but is it posible to a snippet like that?
I found a snippet in the eto libery that shows a page where you use that snipped but it only works on the content field.
//
// Snippet: Showdoc by VTX
//
// Usage: [[ShowDoc?id=x]]
// x = the document to show
//
$output = '';
$tbl = $this->dbConfig['dbase'].".".$this->dbConfig['table_prefix']."site_content";
$sql = "SELECT content FROM $tbl WHERE $tbl.id = $id";
$rs = $etomite->dbQuery($sql);
$resource = $etomite->fetchRow($rs);
$output = $resource['content'];
return $output;
would be a cool option to have a snipped that can do that.
maybe a snippet that get the information from a table by reading all the pages from a folder like above and then depending on the snippet call displays random content, something like [[DisplayTV?tvid=4]] where 4 could be the TVid in the database.
I hope that someone could help me figure out this one
Greets Dimmy