| 13 | | $tmpl = $ctx->mt->db->load_index_template($ctx, $name); |
|---|
| 14 | | $blog = $ctx->stash('blog'); |
|---|
| 15 | | $site_url = $blog['blog_site_url']; |
|---|
| 16 | | if (!preg_match('!/$!', $site_url)) $site_url .= '/'; |
|---|
| 17 | | $link = $site_url . $tmpl['template_outfile']; |
|---|
| | 14 | $cache_key = $ctx->__stash['blog_id'] . ';' . $name; |
|---|
| | 15 | if (isset($_template_links[$cache_key])) { |
|---|
| | 16 | $link = $_template_links[$cache_key]; |
|---|
| | 17 | } else { |
|---|
| | 18 | $tmpl = $ctx->mt->db->load_index_template($ctx, $name); |
|---|
| | 19 | $blog = $ctx->stash('blog'); |
|---|
| | 20 | $site_url = $blog['blog_site_url']; |
|---|
| | 21 | if (!preg_match('!/$!', $site_url)) $site_url .= '/'; |
|---|
| | 22 | $link = $site_url . $tmpl['template_outfile']; |
|---|
| | 23 | $_template_links[$cache_key] = $link; |
|---|
| | 24 | } |
|---|