I'd like to be able to make a list of available stories appear when you browse, without listing the summary and what not. Just an unordered, bulleted list of all the titles.
But! I don't want to lose the ability to list titles with additional details as well.
The user should be able to browse to view a listing of titles as both a simple, plain, orindary, unordered, bulleted list (what Browse>>Categories looks like,) and then also be able to browse to view a listing of titles with the catagory, summary, classes, etc (what it already looks like.)
Ideas?
This is very simple.
I did something similar with my new stories block.
What you need to do is create a new tpl with the format you want the stories to show up as (you can just edit storiesblock.tpl to suite your needs and give it another name, make sure you don't write over the stories block)
, then point the titles page to the new tpl.
storiesblock.tpl?
Can't find that. I have storiesblock.php and storyindex.tpl...
and how does one point the Browse function to the new template? You've lost me.
I thought I might need to add something new to the Browse folder
You'll want to put a create a new file in the browse folder. It's going to be more complicated than what jayleesy suggested, but he's on the right track. Something like this:
You can copy the titles.php file as a place to start. You'll want to delete this line:
$numrows = search(_STORYQUERY.$storyquery, _STORYCOUNT.$storyquery, "browse.php?");
This is completely off the top of my head and you'll have to debug it yourself.
$numstories = dbquery(_STORYCOUNT.$storyquery);
if($numstories > 0) {
$storylist = "";
$squery = dbquery(_STORYQUERY.$storyquery);
while($s = dbassoc($squery)) {
$storylist .= title_link($s);
}
$tpl->assign("pagelinks", $storylist);
}
else {
$tpl->assign("pagelinks", _NORESULTS);
}
This has no pagination. If you want that you'll need to add it.
hmmm, this exact code doesn't seem to be working, and I'm not sure why...
Turn debug on for your site and see if it'll give you an error.
hrm. Nope, no errors.
http://rsveverka.com/ecity/browse.php?type=models
We've got the a-z and what not, and technically this is an attempt to make a list of an entirely different feild that I added, but just attempting it with titles (before customizing) does nothing.
Try adding at the top of the code I gave you:
$tpl->newBlock("listings");
aha, that did something.
now to play with it, see if I can get it bulleted....
