简体   繁体   English

Umbraco-如何将可点击的图像插入页面?

[英]Umbraco - how to insert clickable images into page?

I am a beginner with Umbraco. 我是Umbraco的初学者。 I am able to upload images to the Media Library and then put them onto the page, but for my sidebars I want the images to be clickable links to other parts of my site and other sites. 我可以将图像上传到媒体库,然后将其放置到页面上,但是对于我的侧边栏,我希望图像是可单击的指向我网站其他部分和其他网站的链接。

At the moment I am using the Rich Text Editor to write an anchor tag etc. but this seems ridiculous and I don't want content authors [attempting to be] writing HTML. 目前,我正在使用Rich Text Editor编写锚标记等。但这似乎很荒谬,我不希望内容作者(试图成为)编写HTML。

It seems like there should be a built-in data type for this, or a property on the image but I see nothing. 似乎应该为此内置数据类型,或者图像上有一个属性,但我什么也看不到。 Do I need to write my own Razor code as a DataType? 我需要将自己的Razor代码编写为DataType吗? This seems like such a common thing that I'm surprised there is not a built-in solution. 这似乎很普通,令我惊讶的是没有内置的解决方案。

I'm using 7.2.8 我正在使用7.2.8

If you're already using the RTE, you can just select the image and click the Link button, then whatever you have selected (in this case the image) should become a link. 如果您已经在使用RTE,则只需选择图像并单击“链接”按钮,然后您选择的任何内容(在本例中为图像)都应成为链接。 No need to make your own HTML :-) 无需制作自己的HTML :-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM