Comments (4)
如果在公共局域
(顶栏、侧栏、底部)添加就使用下面判断
{{if ne .PageName "article_detail"}}
https://github.com/ego008/goyoubbs/blob/master/controller/article.go#L478
如果只想在帖内页面私有局域
(帖子内容、回复)输出则可以直接修改模版
https://github.com/ego008/goyoubbs/blob/master/view/default/desktop/article.html
https://github.com/ego008/goyoubbs/blob/master/view/default/mobile/article.html
from goyoubbs.
{{if ne .PageName "article_detail"}}
谢谢老大 我改成 {{if eq .PageName "article_detail"}}就可以在帖内显示了,
老大 现在使用的数据库有文档吗 我想给每个话题加入一个logo图片,我要怎么添加这个字段呢?
第二个问题是老大 我想在首页和分类列表页调用标签但是我把
{{if .Aobj.Tags}} <p class="mytag float-left">{{.Aobj.TagStr}}</p>{{end}}
直接加入category.html里面却获取不到标签
from goyoubbs.
数据库使用方法参考 https://github.com/ego008/youdb/blob/master/example/main.go
其实就是用json 存储数据。
可在 https://github.com/ego008/goyoubbs/blob/master/model/article.go#L13
这个article model 里添加Logo的属性/字段
必须设置Aobj.Tags,或者自己添加一个变量供模版调用....
PS: 快过年了,你怎么还那么用功。
from goyoubbs.
数据库使用方法参考 https://github.com/ego008/youdb/blob/master/example/main.go
其实就是用json 存储数据。可在 https://github.com/ego008/goyoubbs/blob/master/model/article.go#L13
这个article model 里添加Logo的属性/字段必须设置Aobj.Tags,或者自己添加一个变量供模版调用....
PS: 快过年了,你怎么还那么用功。
老大为什么不在帖子里面加一个分享插件呢 这样就可以方便分享到微博 微信 QQ 贴吧等平台了
PS:233 老大新年快乐,总是麻烦你有点不好意思呢,因为放假了想学点东西然后用youbbs做一个二次元社区。
from goyoubbs.
Related Issues (20)
- Hset Zset bug HOT 9
- BUG,分类隐藏后404 HOT 1
- 支持IPv6否? HOT 1
- 小白使用宝塔面板,使用goyoubbs配置ssl保存后运行./goyoubbs显示time out超时
- rss 输出没有转换特殊字符 HOT 1
- 服务如何常开 HOT 3
- 两个比较实用的改进,pr 比较麻烦,直接提 issue 了 HOT 1
- notification 消息数有误 HOT 8
- 回复不返回错误消息 HOT 1
- 可以考虑用 jiebago 替换在线 tag 提取服务 HOT 2
- 不用数据库的? HOT 3
- 配置文件储存在数据库中动态修改 HOT 3
- 请问有SEO优化吗 HOT 1
- 建议增加docker直接部署
- 大佬 可以在帖内增加点赞和点赞列表吗?
- youbbs 现在不开放注册了吗? HOT 1
- hello-001
- API HOT 6
- 能支持下 Markdown 折叠内容 HOT 1
- youbbs现在注册后不能发帖了吗 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goyoubbs.