Linking a whole module

IAM
Contributeur | Partenaire solutions
Contributeur | Partenaire solutions

Is there a way to link an entire module to a page? If I go into the edit template area and have a module I would like to link to a page when it is clicked on.. here is the link to where I am trying to achieve this. http://www.indres.com/-temporary-slug-e8695c22-9a78-40ac-a6ca-581bf9f38268?hs_preview=dFDWczkq-53115...

 

There are 4 boxes under "OUR SERVICES" and I have the text and image linking to a page, but I'd like to link the entire white box. I thought about making a CTA image, but then I lose the hover effect. 

0 Votes
1 Solution acceptée
ashleyidesign
Solution
Contributeur de premier rang | Partenaire solutions
Contributeur de premier rang | Partenaire solutions

One way to do this is to wrap the module in custom HTML in the design manager and insert the link there. The issue with doing that is if you ever needed to change the link it needs to be done in the template instead of on the page. I'm generally against editing content in the template itself. What would also work, which is more flexible for future use, is creating a custom module that you can then wrap in a link tag and edit on the page itself.

----------
Former HubSpotter turned Freelancer
Inbound Marketing Consulting and HubSpot CMS Expert

Voir la solution dans l'envoi d'origine

5 Réponses 5
ashleyidesign
Solution
Contributeur de premier rang | Partenaire solutions
Contributeur de premier rang | Partenaire solutions

One way to do this is to wrap the module in custom HTML in the design manager and insert the link there. The issue with doing that is if you ever needed to change the link it needs to be done in the template instead of on the page. I'm generally against editing content in the template itself. What would also work, which is more flexible for future use, is creating a custom module that you can then wrap in a link tag and edit on the page itself.

----------
Former HubSpotter turned Freelancer
Inbound Marketing Consulting and HubSpot CMS Expert
linusgrundstrom
Membre

Sorry for jumping in to this thread but how would that code look?

jjordanenvy
Participant

Thanks Ashley - I had the same question, and your explanation did the trick. Much appreciated!

0 Votes
Jsum
Conseiller clé

Hey @ashleyidesign,

 

I just wanted to point out that you can use HubL in the wrapper code area for any given module so you could actualy assign the link href to a text module with no_wrapper set to True and the links would be editable in the page editor.

IAM
Contributeur | Partenaire solutions
Contributeur | Partenaire solutions

Thank you! I ended up just making them custom modules and linking the entire div.

0 Votes