Very nice theme.

Is there any way to make the pictures on the frontpage link to a gallery made in Views?

Hope someone can help me out.

Thank you very much.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

raslee’s picture

Hi there!

Been wondering about the same thing.

I made my gallery with views. Is there any way to make the pictures on the front page, be the first picture in one of my views galleries?

/raslee

israelshmueli’s picture

@ChrisMatt :
The default Drupal front page is actually a list of teasers. By default any image field in teaser will link (or not) as configured in the its content type "Manage Display" tab in "teaser" mode. For content type "article" it will be /admin/structure/types/manage/article/display/teaser .

In the Demo website image fields in teaser (for article node type) configured as

Image style: medium
Linked to content

If you need more specific link you can start by modifying the example view that shipped inside "examples" folder of FontFolio.
You will need to import the file content and modify the image field of "Attachment, Single Bigger..." display.
See Screenshot.

If you need different link for each image you can add link field to your content type.
And in your view you can link each image to the link inserted via the Link field.

To link an image field in view to a link field content you should

  1. Add the link field to your view .
  2. Now hide it by checking "Exclude from display" checkbox.
  3. Make sure the new link field is above the image field in fields "rearrange" order.
  4. Inside your view image field configurations > Rewrite results > check the "Output this field as a link" checkbox
  5. Inside your view image field configuration Rewrite results > Replacement patterns, copy your specific link field Replacement pattern.
  6. Paste the replacement pattern inside Rewrite results > Link path
  7. Apply field changes & Save your view

Please tell me if it solved your problem.

israelshmueli’s picture

Hi raslee,

FrontPage view

  1. You will need to display the frontpage as modified version of the example view (exported txt file inside "examples folder" ).
  2. Make sure your frontpage view filter to display only nodes with "Promoted to front page" Publishing option.
  3. See comment#2, my reply to ChrisMatt, for instruction how to add custom link to each image.

Inner pages views

  1. Make sure that for each gallery you have only 1 single node with "Promoted to front page" Publishing option.
  2. Add new sort criteria "Content: Promoted to front page".
  3. Make this new criteria be the first on in the "rearrange" order.
    This should make the single promoted node displayed as first result of the view.
israelshmueli’s picture

Hi raslee,

Attached to this comment new version of the example view: fontfolio_image_fields_with_taxonomy_links.
In this version every image linked to its node taxonomy name.
In order for the links to work you should creat alias for each term with its name in lower case and dashes replace spaces (e.g for "Vessel Sinks" create "vessel-sinks" alias).

raslee’s picture

Hey israelshmueli,

Thank you very much for your help.

I'm not sure what you mean by: "You will need to display the frontpage as modified version of the example view (exported txt file inside "examples folder" )."

/raslee

israelshmueli’s picture

FileSize
93.3 KB

In "Site information" page you override default Drupal's frontpage with any page you want.
Just specify its path inside "Default front page" field.
"Site information" can be found at /admin/config/system/site-information
Define custom Drupal front page

Inside the current version of fontfolio theme you can find example folder with exported view as text file named export-of-fontfolio-frontpage-fields-view.txt

Assume you enabled "views" module ,as well as "views ui" module, you will be able to import fontfolio's example view into your website. Just copy the content of export-of-fontfolio-frontpage-fields-view.txt file and paste in the proper field via /admin/structure/views/import .
So by

You will need to display the frontpage as modified version of the example view (exported txt file inside "examples folder" ).

I meant that after importing the view you can modify its properties to your needs.
You can try importing both views: the example shipped with fontfolio as well as the view attached as text file to comment #4 .

ChrisMatt’s picture

Hey israelshmueli,

Thanks for your help.

Just to make sure we are talking about the same thing: What I want to do is not to display a view on the front page, but I want the pictures on the front page (as seen in your demo) to link to a view instead of a basic page. Is that possible?

The point is, I want the users to go directly to a view with alle my paintings just by cliking one of the pictures on the front page.

Thanks again.

/Chris

israelshmueli’s picture

Replacing the default teasers list with the same nodes represented by fields will allow you to tie custom link to the image and title fields and perform this task using Drupal's point and click admin interface of views and content type fields.

I am not aware to a point and click way to make each node teaser linked title to point to custom view URL instead its default "link to full version of itself".
In order to achieve this kind of customization without views you will have to edit the markup of the teaser title inside a template file (the generic node.tpl.php or node--your_custom_type.tpl.php).

Maybe...

I am not sure but..
If on frontpage each titled picture is "hand picked" painting that represents a category of paintings...
and you prefer to stay with this funcionality... When the user click the link and arrive the full node display.. What if here, in full node display she will meet the desired view ...
There is a "ViewField" field type. This field enable you to display view as node content.
Via content type "Manage Display" you can hide the representative image in Full node Display and hide the Viewfield in teasers display.

Or.. I am getting you wrong and not answering your needs and situation... If so, please supply more details and description.