List and Detail pages

6 posts by 2 authors in: Forums > CMS Builder
Last Post: September 27, 2008   (RSS)

Hello all.

I am a little confused about List and Detail pages.

I want to be able to create multiple pages per directory. So, for instance, if I make a section about dogs, I would like an index page and numerous other pages (like dog toys, leashes, dog food) in the same section. Then I would like to do a different page for, I dunno, Cats.

I have an html template setup. But I'm not sure what code to put on it. The List.php? The Details.php. I did the list and it put out all of the articles on that page and it was a mess. I did the Details code and I went to create new content and it overwrote the previous content.

So I'm just confused about how to create an index page and be able to easily create new content on the fly without having to keep going in and messing with the code.

Any help would be appreciated.

Dave

Re: [Mr Jim] List and Detail pages

Jim, thanks for the detailed explaination. I will give it a go.

Re: [thedmp] List and Detail pages

So now I have an index page that links to the details page, but those links are the url of that page and not the title of the page, so it makes a really long and ugly link. I don't suppose there is a way to have this link to the details page be the title of that page? Otherwise, I will need to go back in to the html and make a static link to the new page each time I create an article. Thanks again for the help.

Re: [thedmp] List and Detail pages

By MisterJim - September 27, 2008 - edited: September 27, 2008

On the dogIndex.php page, change:

_link : <a href="<?php echo $record['_link'] ?>"><?php echo $record['_link'] ?></a><br/>

to the following:

_link : <a href="<?php echo $record['_link'] ?>"><?php echo $record['title'] ?></a><br/>

Jim
WebCamp One, LLC



Websites That Work

Re: [Mr Jim] List and Detail pages

Yep, that did the trick. Thank you.