thanks for the reply. I will wait for the major release then
asma_90
Posts
-
W3C validator error : Attribute component not allowed on element .... -
W3C validator error : Attribute component not allowed on element ....I keep getting this error (more than 25 errors ) when I validate my theme (which is build on the persona theme), will it be an issue if I delete the attribute "component" from my ul, li, h2.....
examples of the errors I get:
Attribute component not allowed on element li at this point.
Attribute component not allowed on element h2 at this point.
Attribute component not allowed on element i at this point. -
how to remove header and footer from 404 error templates.the answer is in this topic :
https://community.nodebb.org/topic/11906/add-a-class-to-the-body-if-the-template-is-404/3 -
add a class to the body if the template is 404I tested that and it works great ! thanks again for your help
-
add a class to the body if the template is 404is there a way to add an if statement to header.tpl where it adds the class "error_page" to the page if the 404 template is rendered (page not found)? this will help me hide the sidebar, for example, using CSS.
-
help with using helpers inside my theme@PitaJ thank you so much!
-
help with using helpers inside my themeI managed to make some changes on my template from the client side, but am trying to do the same thing on the server side. I am trying to create a helper. but somehow It doesn't work. here what I have done :
first I added the hook on plugin. json :
{ "hook": "filter:topics.get", "method": "clAppendTitle" }
then in library.js I added this code :
var Benchpress = require.main.require('benchpressjs');
.....
.....library.clAppendTitle = function (params, callback) {
Benchpress.registerHelper('clAppendTitle', function () {
console.log("inside my filter");
});
callback();
};I am trying to solve this issue for some time now. please someone help ! I am unable to figure out how to create and use helpers. I am using the last version of nodebb.
-
how to remove header and footer from 404 error templates.I have created 404.tpl , and added my custom message. however, I dont want anything else to appear. I tried to use Jquery to do this and it works but after the page is load, so it shows the header and footer for a second then hide them. is it possible to do so before page load ??
thank you !!
-
404.tplok, I found out how. you simply create a template with the error name inside your theme. example 404.tpl
hopefully, this might help someone. -
is it possible to alter the pattern of the URL pattern for topicsI am trying to change create a different pattern for the URL. for example :
from this URL : ...../topic/125/topic-title
to this URL : ...../fragen/topic-titlewhich means I want to replace topic with fragen and remove the topic number. is it possible?
-
404.tplI am trying to add a 404.tpl to my custom theme, as I want a custom error page to appear rather than the default one. I am not sure where to edit or add this file inside my theme. can someone help me, please?
-
is it possible to do simple calculation (addition and subtraction) inside templates.I solved my problem, but without using a helper function. here is how I solved it:
$(window).on('action:topic.loaded', function (event, data) {
var replynum = data.postcount - 1;
console.log(replynum)
});I have tested it and it works, every time a topic is loaded I can get the postcount.
However, I am still unable to know why my helper function is not being executed -
is it possible to do simple calculation (addition and subtraction) inside templates.I registered a hook, I wanto get data from the post (the data I want is post count) but somehow my function is not being fired. am I using the wrong filter ?
"hook": "filter:post.getPostData", "method": "replynum"
Thank you !
-
is it possible to do simple calculation (addition and subtraction) inside templates.is it possible to make simple calculation inside the templates?
for example, I want the number of the replies only (not the number of posts) which means:
number of posts -1. -
print category name inside topic page@baris it works! thanks a lot!
-
print category name inside topic pageIs there a way to render the category of a post in a topic page ? something like this work inside recent page :
<a href="{config.relative_path}/category/{topics.category.slug}"> {topics.category.name}</a>
is there anything similiar where I can add inside post.tpl ?
am trying to avoide using js for this. -
how to add sort dropdown (the one that on the category) to "recent" pageI am trying to add a sorting mechanism to the recent page (forum/recent) exactly like the one the category page (/forum/category/) where the topics can be sorted either from newest to oldest, oldest to newest, most posts. is that possible?