<div class="aw-mod aw-topic-bar" id="question_topic_editor" data-type="question" data-id="<?php echo $this->question_info['question_id']; ?>"> <div class="tag-bar clearfix"> <?php foreach($this->question_topics as $key => $val) { ?> <span class="topic-tag" data-id="<?php echo $val['topic_id']; ?>"> <a href="topic/<?php echo $val['url_token']; ?>" class="text"><?php echo $val['topic_title']; ?></a> </span> <?php } ?> <?php if ($this->user_id AND ((!$this->question_info['lock'] AND $this->user_info['permission']['edit_topic']) OR $this->user_id == $this->question_info['published_uid'])) { ?><span class="icon-inverse aw-edit-topic"<?php if (sizeof($this->question_topics) == 0) { ?> style="display:none"<?php } ?>><i class="icon icon-edit"></i></span><?php } ?> </div> </div>
AI智能回复搜索中,请稍后...
line 316 $question_topics = $this->model('topic')->get_topics_by_item_id($question_info['question_id'], 'question');
line 325 TPL::assign('question_topics', $question_topics);
查询数据库aws_topic_relation中问题关联的话题id 返回话题数组。
通过TPL::assign 传递到模板 模板通过$this->question_topics调用该数据。
2.关于 url_token
我的理解是在aws_users中的[size]个性网址[/size]。‘
参考:WeCenter 数据库辞典 v.3.18