1

I am recently learn the source code of the telescope, which build on Meteor. I want to modify the interface of the post page. But when I open the file of /packages/telescope-posts/lib/client/templates/post_body.html, I can't find the definition of {{{htmlbody}}}. Who can tell me where to find this variables. I just want to modify the interface of the post, and I can't find which file or template realized that.

The post_body.html is follow:

<template name="post_body">
  <div class="post-body markdown" aria-live="polite">{{{htmlBody}}}</div>
</template>
Matthias A. Eckhart
  • 5,136
  • 4
  • 27
  • 34
  • It seems that `htmlBody` is a field of the respective document. Triple brackets are used to render data as HTML elements. – Matthias A. Eckhart Jul 24 '15 at 05:43
  • Thank you for answer my question. Do you know which file realized the interface of post? – chengchaolee Jul 24 '15 at 06:14
  • What do you mean by "interface of post"? – Matthias A. Eckhart Jul 24 '15 at 06:19
  • Telescope has a function of Post. I want to change the web page(interface) of the post. In other word, I want to design the page by myself. So which template or file realize the page in source code. – chengchaolee Jul 24 '15 at 06:35
  • I don't understand what you are trying to do. Can you please elaborate? It sounds to me like you are trying to modify the way `htmlBody` is set up. The `{{{htmlBody}}}` expression just outputs the user input from the `/packages/telescope-posts/lib/client/templates/post_submit.html`. Do you want to modify the data structure of documents in the `Posts` collection? – Matthias A. Eckhart Jul 24 '15 at 07:38
  • oh, no. May be I have misunderstand the pakage of posts. I just want to modify the web page which we use in telescope. I don't know which part realized this page. I want to find it, it's may not be the {{{htmlBody}}}. the page is follow: – chengchaolee Jul 24 '15 at 07:47
  • http://demo2.telescopeapp.org/submit – chengchaolee Jul 24 '15 at 07:53
  • This is the corresponding template: `/packages/telescope-posts/lib/client/templates/post_submit.html`. – Matthias A. Eckhart Jul 24 '15 at 07:55
  • Ok, thank you. It seem that this page realized by the template of "bootstap3-horizontal". So can I modified it ? You are very kind. I will try it by myself. – chengchaolee Jul 24 '15 at 08:05
  • The `post_submit.html` template currently includes a form provided by the [meteor-autoform](https://github.com/aldeed/meteor-autoform) package. – Matthias A. Eckhart Jul 24 '15 at 08:09
  • Oh, that's all right, I finally konw "quickForm" which come from meteor-autoform. Thank you very much. – chengchaolee Jul 24 '15 at 08:16

1 Answers1

0

The corresponding template you are searching is named post_submit.html which is located in /packages/telescope-posts/lib/client/templates/ (access file on GitHub).

This template currently includes the meteor-autoform package:

<template name="post_submit">
  <div class="grid grid-module">
    {{> quickForm collection="Posts" id="submitPostForm" template="bootstrap3-horizontal" input-col-class="controls" type="method" meteormethod="submitPost" fields=postFields}}
  </div>
</template>

This package provides an extendable template system with various built-in templates like bootstrap3. If you want to use your own classes to customise the layout, use the plain template, which will generate UI elements without a framework.

Matthias A. Eckhart
  • 5,136
  • 4
  • 27
  • 34