Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yii2admin\frontend\views\index\index.php 的问题 #1

Closed
anjocee2 opened this issue Dec 7, 2016 · 1 comment
Closed

yii2admin\frontend\views\index\index.php 的问题 #1

anjocee2 opened this issue Dec 7, 2016 · 1 comment

Comments

@anjocee2
Copy link

anjocee2 commented Dec 7, 2016

在我的安装版本里面,yii2admin没有安装在网站的根目录,所以有些问题就出现了。
比如首页顶部的轮播图片不显示,比如下部的文章列表前面的小图不出来。
看了一下代码,很明显是 views/index/index.php 里面,没有很好地使用 @web 别名,在用到图片的时候,直接使用了绝对路径。
比如顶部轮播的图片:
<img src="/static/images/assassins1.jpg" alt="第一张幻灯片"
实际上应该写成这样:
<img src="<?=Yii::getAlias('@web/static/images/assassins1.jpg')?>" alt="第一张幻灯片"

下面的正文前小图同样:
<img src="/static/images/01.jpg" />
应该写成
<img src="<?=Yii::getAlias('@web/static/images/01.jpg')?>" />

以上。

@e282486518
Copy link
Owner

嗯,前端还没有完善,只是做了几个大概的模板以供参考。

@baqianxin baqianxin mentioned this issue Mar 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants