CMS Development

IAM
Contributor | Partner
Contributor | Partner

Linking a whole module

SOLVE

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 Upvotes
1 Accepted solution
ashleyidesign
Solution
Top Contributor | Partner
Top Contributor | Partner

Linking a whole module

SOLVE

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.

View solution in original post

5 Replies 5
ashleyidesign
Solution
Top Contributor | Partner
Top Contributor | Partner

Linking a whole module

SOLVE

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.

linusgrundstrom
Member

Linking a whole module

SOLVE

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

jjordanenvy
Participant

Linking a whole module

SOLVE

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

0 Upvotes
Jsum
Key Advisor

Linking a whole module

SOLVE

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
Contributor | Partner
Contributor | Partner

Linking a whole module

SOLVE

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

0 Upvotes