Jump to:

23478 Posts in 18941 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » ImageField with Link To Menu

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 642 Views
  • VirtuallyUknown
    Community Member
    4 Posts

    ImageField with Link To Menu Link to this post

    I was wondering if there is a way to have a ImageField with a Link To menu (radio list) like in the HTML editor for links? I want to have my client be able to link to pages in the site or external content.

    I found this in the forum to link to a page...

    'MainImage' => 'Image',
    'MainImageImageLink' => 'SiteTree',

    $fields->addFieldToTab("Root.Content.Images", new FieldGroup(
    new TreeDropdownField("MainImageImageLinkID", "<b>Main Image Block</b><br />Select the page to link to and then choose the image to display", "SiteTree"),
    new ImageField('MainImageImage','')

    Can I add anything to get the Link to menu with the ImageField or can I only link the image to pages in the site?

    Thanks for any help

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.