How do I direct a card title link to a page I create?

This is my first Backdrop site, and this is my last hurdle. Also when I put my website live, and I click on one of the card titles, I get an error message "The requested page "/node/83" could not be found." - different node ID's for different cards.

I am not a website developer, obviously. I am trying to launch my small business with a simple website, that displays my relatively small catalog of products. This is pretty much the final issue before I make the site live.

Thank you for any help you can give!

Accepted answer

I have looked at quite a few, and will look at these too.

Thank you again!

Comments

Olafski's picture

Hi Kelly_Makir, if I get you right, your are not trying to link the card title to the card content itself but to another page. If that's the case, and assuming that  your question refers to the cards displayed on the home page, you could add a link field to the "Card" content type and use the link in the "Promoted cards" view.

Note that the configuration screen for views is quite complex, so it's difficult to describe every single detail. I hope however, the following steps are helpful.

  1. Go to the "Manage Fields" screen of the Card content type (example.com/admin/structure/types/manage/card/fields), and add a new field called "Link" for the link.
  2. Edit a Card item, look for the new Link field, and add a link to a page. Repeat this step for other Cards.
  3. Go to the view "Promoted cards" (example.com/admin/structure/views/view/promoted_cards).
    1. Look for the "Fields" section, and click "Add".
    2. In the dialog, search for the name of the Link field created in step 1, e.g. put "link" or "node:card" in the Search field.
    3. Select the Link field, check "Exclude from display", choose the Formatter "URL, as plain text", and add the field.
    4. In the "Fields" section, click the arrow next to "Add", choose "Rearrange", and drag the Link field above the Title field.
    5. Configure the Title field. In the dialog, under "Rewrite results", click "Output this field as a link", and note the "Link path" input.
    6. Scroll down to "Replacement patterns", open the section, copy the token for the link field, e.g. [field_link], paste it into "Link path", and apply the dialog.
    7. Save the view.
  4. Go to the home page, and check your Cards.

Yes, That is my desire.

Thank you! I'll give it a go.

I was unable to make it work. 

I added the new Field Link, but I couldn't find a ... view/promoted_cards. Any thoughts would be most appreciated.

Olafski's picture

Strange that you couldn't find the "Promoted cards" view. This view is part of a Backdrop standard installation. Have you maybe removed or disabled the view accidentally? Look at the page example.com/admin/structure/views, and see if you find the "Promoted cards" view there. If it's disabled, it is probably further down in the list and styled less prominent.

Another idea, if the above doesn't help: The card feature was introduced with Backdrop 1.22 (see https://backdropcms.org/news/backdrop-122-released). If you have installed your site with an earlier Backdrop version, this could be an explanation for not having the "Promoted cards" view. However, in this case you also shouldn't have a "Card" content type. Questions:

  • When (i.e. with which version) did you install your Backdrop site?
  • Did you build the Card content type by yourself, or was it already there?

If that also doesn't help, you could install a fresh Backdrop site, export the "Promoted cards" view from there, and import the view into your existing site. (Be sure to backup the database and the configuration files before, just in case.)

Thanks for your thoughts. I believe it was 1.26. I remember deleting the sample cards, but used the Card format that was already there.

The only similar view is the Promoted Content View, and it doesn't have any Fields available (Screenshot).

I have started a new site from scratch, guessing that I screwed up something along the way. Hopefully that will resolve the card issues. 

This is a small business website for electric boat outboards. There's not a lot of business yet, but there probably will be in the not too distant future.

Once again, thank you for your help!

I have looked at quite a few, and will look at these too.

Thank you again!