cancel
Showing results for 
Search instead for 
Did you mean: 

How to include a link to a category in a static block

SOLVED

How to include a link to a category in a static block

I would like to include links to hidden categories in my cms static blocks. What is the correct way to do that?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to include a link to a category in a static block

@rachelalbert

 

Use the category link widget.

Let's say, you want to add a link to category with ID 1.

Add this to your cms page/block:

{{widget type="catalog/category_widget_link" anchor_text="Some text" title="Some text" template="catalog/category/widget/link/link_inline.phtml" id_path="category/1"}}

 

Follow this and you can accomplish what you want.

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

View solution in original post

2 REPLIES 2

Re: How to include a link to a category in a static block

@rachelalbert

 

Use the category link widget.

Let's say, you want to add a link to category with ID 1.

Add this to your cms page/block:

{{widget type="catalog/category_widget_link" anchor_text="Some text" title="Some text" template="catalog/category/widget/link/link_inline.phtml" id_path="category/1"}}

 

Follow this and you can accomplish what you want.

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

Re: How to include a link to a category in a static block

Hi,

 

i have links to the categories in the text of my home page and inserted them with the "insert widget" button so that the code is as shown above.

 

But i want to have a comma after one Link and there is a whitespace shown. Can i fix this?

 

Thanks in advance,

hesa.