Hi Guys

I am new to drupal and web dev and am developing a site locally on a wamp server. I've got my theme\layout down and now I'm on to building the content. One thing I really need is the facility to have a static page with a list of categorised web links. I'd like to be able to periodically add links to the page and have the ability to remove them.

I suspect this can be done with Views and cck but I really don't understand how to do it. After googling around for a couple of days I have found very little on the subject. The only step by step tutorials I have found use older versions of drupal and I can't seem to relate them to the current version. There are two modules in the repository that I suspect would help but I'm not absolutely clear on what they do. I think one is just a CCK field (i.e adding a title and link field with the ability to chose where the link is displayed).

What is stumping me is how to add and\or remove each link without manually editing the page each time. Can anyone help me?

TIA

Comments

vm’s picture

CCK.module allows for content type creation
veiws.module is a query writer that generates lists of content

what it sounds like you want is a link databse or the book.module

WiZeR’s picture

Thanks VM. A links database is exactly what I want, I just can't work out how to do it. Unless there is already a module out there (I've searched). I hadn't considered the books module, will investigate, but I suspect it won't be right for what I want.

vm’s picture

http://drupal.org/project/weblinks

however, the idea that you want to manipulate links to show/no show without editing is likely going to be an issue.

mcfilms’s picture

Once you get a handle on using CCK and Views, you wont want a single module. You could create a new content type, weblinks... Then add fields for the name, the url to point to, and either a cck text field to assign them a category OR a Taxonomy field where you could assign terms (keywords). Then you create your content. You could control whether or not they are seen by using the publish/unpublish button,

The Views part will take a little longer to "get". But basically you are creating a view, filtering it for the node:type "weblinks" and node:published "true". You would load in the fields you created and configure them how you want them to display. You could even use another view that takes the keywords or the category and groups the first view's content under them.

It might take some days to get this to work. But once you get it, you want to use it for everything.

If you use a module and you decide later to add a description and module doesn't support it, you are hosed. But with views and CCK, you add a field to the content type, and display it in your view. Done.

AND PS -- Regardless how you go, if the module creates each of the weblinks as an individual piece of content (node), you can surly control their visibility with publish.

A list of some of the Drupal sites I have designed and/or developed can be viewed at motioncity.com

WiZeR’s picture

Thanks for your help mcfilms. I did wonder if it was as 'simple' as just posting each link as an unpublished node. It seemed like it might be 'bad practise'. But reading someone else explain it, it makes sense. I agree with you about hand coding it with cck and views which was the crux of my initial post. As you say, I'm going to take a few days to get my head around this. I think I understand the basics. Wish me luck, I'll need it.

WiZeR’s picture

Right, I've made some progress. I created a content type called Links. In it I used the Title as a category. i.e Retailer, Manufacturer, etc. Then I used CCK field that is within the Links module that has a Links Title and Link URL field. I left the body blank so it was excluded, unticked published and promoted, disabled comments and then saved it. I then populated a few examples. Creating the view was the confusing part. I stumbled through it but something is not right. The test results looks like this:

http://www.wizer.co.uk/images/views1.jpg

It is sorting by the 'category' which I am using the Node Title. I don't understand what all the extra lines are?

This is the view

http://www.wizer.co.uk/images/views2.jpg

Is there a way to get the 'category' (i.e node title) to display once at the top of each set of links?

Help appreciated.

mcfilms’s picture

I have only done this once and I had to hire a guy to help me. It would take me a couple hours to do it again. But the info you want is out there. Research the module Nodereference and Relationships in Views. It is the way to create a "View of Views". In addition you would use grouping fields.

I really don't know why you are getting all that negative space. The one thing I can say is that I don't think using the title AS the grouping field is common. I'm not saying it is WRONG, I'm just saying it is uncommon. Most people would make a separate CCK field called "Category". The title should be a unique name and in your scenario, you will have many nodes titled "Retailer". Is that a problem? I don't know.

A list of some of the Drupal sites I have designed and/or developed can be viewed at motioncity.com

WiZeR’s picture

It looks like I'm going to have to do some heavy researching and testing.

I did wonder about using the none title as the category. But as that field is mandatory, I didn't know what else to put in there. Link? Then it's the same problem of having up to a hundred entries names Link.

Who did you hire. Was is expensive?

I may have to go with Wordpress as this is all a bit too labour intensive for the site I'm building. Drupal is much more powerful but it's really meant for trained developers, not trained monkeys.

mcfilms’s picture

The thing you describe sounds so simple. Why not install an configure FCKeditor and just put your categories and your links in there? FcKeditor (once you get it installed) is like a word processor. You get a toolbar and you can format text and add and edit links in there.

If you go that route, you must read the directions. Because you install the module, but also have to install the fckeditor (free, GPL) in the module folder as well.

I paid the guy that helped me with the view of views $100. I figured it was worth it to have that knowledge. But, alas, I haven't needed it since and don't really remember it too well.

Hate to see someone give up on Drupal. But I agree that Wordpress is less complicated.

Good Luck!

A list of some of the Drupal sites I have designed and/or developed can be viewed at motioncity.com

WiZeR’s picture

That sounds like a simple solution, I already have FCK installed. I guess I was just trying to make it 'clever' and learn about CCK\Views along the way. This site will only be administrated by me so it's no big deal to have it as traditional HTML page (which I can do). I'm developing the same site on both platforms and I'm finding WP easier, but I know Drupal has the power to grow the site in the future. I'll keep plugging away, perhaps I need a book on CCK\Views.

Thanks for your help.