How to generate a custom view link?

Customize the view link appearance in a CF list.

Overview

The default view link in a CF list cannot be easily styled as a button or with an icon.
Add the desired field to the Columns List Box, then use the HTML Box to create a custom link with button HTML and icon classes.

Answered
an anne1979 21 Apr, 2016
Hello again,

and just another question:
How can I take influence on the view-link (from list to view) generation, e.g. add an icon or use a button or a custom text?
I guess, that it might be done using the boxes of "Settings" >"HTML" or "Settings" >"Links" - but I don't know how to achieve it...

Thanks again,
Anne
Gr GreyHead 22 Apr, 2016
Hi Anne,

You can add an icon using the HTML box - but I think that you have to add the Edit URL there too.

You can make a standard edit link look like a button by adding the btn class. This is tricky because of the HTML that is used but you could probably do it with a few lines of jQuery.

Bob
an anne1979 01 May, 2016
Answer
1 Likes
Hello Bob,

I managed to setup the custom link by putting the following code into the HTML Box:
Fahrzeug.id:<a href="/index.php/direkteinstieg-fahrzeugsuche?cont=lists&ccname=sucheFahrzeuge&act=view&gcb={Fahrzeug.id}"><button type="button"><i class="fa fa-share" aria-hidden="true"></i> anzeigen</button></a>


It is important to mention, that you need to put the field to use (Fahrzeug.id in my case) into the Columns List Box at the top of Front list, too, otherwise it won't be processed.

Maybe this hint and example can save some time for others😉

Have a nice evening,
Anne
This topic is locked and no more replies can be posted.