Real-time page editor

Feature Requests

Suggested Topics


  • 0 Votes
    3 Posts
    426 Views

    Thanks for the help and sorry if the "terrible" word hurts your feeling, I didn't mean to.

    @PitaJ said in the issue of benchpressjs:

    First off, calling their work "terrible" is a really bad strategy if you're trying to get help from someone. I'll still help, because I like being helpful, but please don't act this way in the future.

    #1. about Interpolation, benchpressjs does NOT allow to retrieve array by index, like this:
    <h1>{localNews.topics[0].title}</h1>

    If you're trying to just get a specific single element of an array, you just put the number as the property name, like so:

    <h1>{localNews.topics.0.title}</h1>

    I see this isn't documented, so I'll open an issue to document this behavior.

    #2, about helper function, I created one like this:
    Benchpress.registerHelper('getByIndexInArray', function (arrayData, i) {
    return arrayData[i];
    });

    and call this helper function like this:
    <h5>{getByIndexInArray(localNews.topics, 1)}</h5>

    But it seems like the index "i" can not be passed into the helper function, since in this helper function, I always got "i" as undefined.

    Your helper is correct, it's how you're calling it that's the issue. Benchpress doesn't have numeric literals, it only has string literals. Putting just 1 in there is telling Benchpress to look up the property "1" on the global object, and call the helper with that value (which is undefined in your case). Your helper will work if you call it like this instead:

    <h5>{getByIndexInArray(localNews.topics, "1")}</h5>

    I will also add a note to document this behavior in the paths and helper section.

    Issue is here: https://github.com/benchpressjs/benchpressjs/issues/89

  • 1 Votes
    1 Posts
    199 Views

    Hi,

    This is related to this: https://community.nodebb.org/topic/14872/group-page-only-shows-limited-number-of-posts?_=1597422316813

    We're getting more requests from our users to have ability to view more posts in group pages.

    Thanks!

  • 0 Votes
    5 Posts
    1k Views

    Been offline for a bit but it looks like this has been addressed. This has been fixed by @julian in commit d33d965 to nodebb-theme-persona and commit 9d202d9 to nodebb.

    Thanks Julian!

  • 7 Votes
    8 Posts
    5k Views

    It looks like the discussion content in this topics has become outdated, so should I refer to the docs site directly instead?

    I want to customize the default home page and post detail page, which involves layout and style customization, so, am I correct to develop a new theme for this?

  • Post Editor

    Feature Requests
    0 Votes
    3 Posts
    1k Views

    Rather than dragging the button to make it bigger, just click it. 👍