Where's the template file of 'composer' ?

NodeBB Development

Suggested Topics


  • 0 Votes
    1 Posts
    152 Views

    Hey!

    How do I get the parent of the actual category in a Tamplate?

    Im just looking around and found this:

    <!-- IF breadcrumbs.length --> <ol class="breadcrumb"> <!-- BEGIN breadcrumbs --> <li<!-- IF @last --> component="breadcrumb/current"<!-- ENDIF @last --> itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb" <!-- IF @last -->class="active"<!-- ENDIF @last -->> <!-- IF !@last --><a href="{breadcrumbs.url}" itemprop="url"><!-- ENDIF !@last --> <span itemprop="title"> {breadcrumbs.text} <!-- IF @last --> <!-- IF !feeds:disableRSS --> <!-- IF rssFeedUrl --><a target="_blank" href="{rssFeedUrl}"><i class="fa fa-rss-square"></i></a><!-- ENDIF rssFeedUrl --><!-- ENDIF !feeds:disableRSS --> <!-- ENDIF @last --> </span> <!-- IF !@last --></a><!-- ENDIF !@last --> </li> <!-- END breadcrumbs --> </ol> <!-- ENDIF breadcrumbs.length -->

    How can I get the parent category-Name of the current (sub)category?
    Is there any reference I can use for such things in the future?

    What I like to do:

    Get the parent of the actual category use this value e.g. "foobar" to call the API of an external software and get JSON-Object depend on value "foobar" convert the data to display it between breadcrumbs / new topic in the nodeBB Forum

    Is it the right way to handle this with a template or am I completely wrong?
    I just installed nodeBB and I also do have no idea about node.js and all that stuff so sorry I am a noob. 🐵

    Kind regards, Pascal.

  • 0 Votes
    3 Posts
    779 Views

    Definitely not in 1.7.2 since that's being released this week. Using Webpack at this point would require, essentially, a complete rewrite.

    That's a lot of work.

  • 0 Votes
    10 Posts
    3k Views

    @julian Yep that's correct. It wasn't showing at the moment @exodo 's wrote, but a while after that it showed up. Thanks @julian

  • 0 Votes
    5 Posts
    2k Views

    @esiao @Mega My bet - that is been resolved by simply updating the forum to 6.0. Sorry i though i'm in different topic 🙂

  • 6 Votes
    23 Posts
    13k Views

    Hi, I'm the s9e\TextFormatter author. I have a couple of Google Alerts so unlike Beetlejuice you only have to save my name once for me to appear. 🙂

    s9e\TextFormatter is a PHP library with a JavaScript port. It uses plugins to let the user pick and choose what kind of features they want. The JavaScript version is generated by the PHP library, which means you'd need PHP as part of your build process. Once the JavaScript is generated it can be redistributed easily so I guess you could bundle a preconfigured/pregenerated version. You can see a couple of live demos there: BBCodes+stuff demo, Fatdown (Markdownish+stuff) demo.

    The client-side rendering is performed with XSLTProcessor. Adding an MSXML fallback for IE is easy. Rendering in pure JS is technically feasible (there's already a pure PHP renderer) but I never got to it because I have no use for it. The library could be used as the base for a true WYSIWYG editor (where what you see is actually what you get because there's no conversion from HTML back to Markdown or things like that) but that would be a big project. I'd be willing to discuss any type of collaboration if someone's interested.