Announcement
Collapse
No announcement yet.
Giving categories unique ID's
Collapse
X
-
Glad to help and thanks for confirming that the code works.
- Top
- Translate
- Bottom
-
Originally posted by glennrocksvb View PostWith your changes, I think it can be easily done in the display_Forums_list template instead of doing it in JS.- Paste this code right after the <vb:each from="channels" value="channel"> line. (line 5 in vB 5.7.0)
HTML Code:<tbody id="category{vb:raw channel.nodeid}">
- Paste this code right before the last </vb:each> line. (line 97 and the last line in the template in vB 5.7.0)
HTML Code:</tbody>
The template change does work and your JS code works as well.
Cheers.
- Top
- Translate
- Bottom
- Paste this code right after the <vb:each from="channels" value="channel"> line. (line 5 in vB 5.7.0)
-
With your changes, I think it can be easily done in the display_Forums_list template instead of doing it in JS.- Paste this code right after the <vb:each from="channels" value="channel"> line. (line 5 in vB 5.7.0)
HTML Code:<tbody id="category{vb:raw channel.nodeid}">
- Paste this code right before the last </vb:each> line. (line 97 and the last line in the template in vB 5.7.0)
HTML Code:</tbody>
Last edited by glennrocksvb; 11-29-2022, 11:08 AM.
- Top
- Translate
- Bottom
- Likes 1
Leave a comment:
- Paste this code right after the <vb:each from="channels" value="channel"> line. (line 5 in vB 5.7.0)
-
Nice one darkboy245. But you need to use <tbody id="catsXXX"></tbody> to prevent generating invalid HTML markup. Table tags cannot have <li> tag as parent of <tr> tags.
- Top
- Translate
- Bottom
Leave a comment:
-
Originally posted by glennrocksvb View PostThis will require substantial changes to the display_Forums_list template. Changing the HTML structure will depend on how your intended style would look like.
Here is the code:
Code:$('.category-header').each(function() { $(this).nextUntil('.category-header').addBack().wrapAll('<li id="cats"></li>'); });
- Top
- Translate
- Bottom
Leave a comment:
-
This will require substantial changes to the display_Forums_list template. Changing the HTML structure will depend on how your intended style would look like.
- Top
- Translate
- Bottom
Leave a comment:
-
Originally posted by glennrocksvb View PostIt already has forum id.
The challenge in customizing the style is the entire list uses a single <table> tag. It would have been easier if each category and its forum channels is in its own <table>. Or better yet, to not use <table> tag.
I have a pure CSS mod to separate the forum category list in its "own table". It's not perfect due to the challenge mentioned above but here it is:
https://vbmods.rocks/forum/vbulletin...oud-compatible
- Top
- Translate
- Bottom
Leave a comment:
-
It already has forum id.
The challenge in customizing the style is the entire list uses a single <table> tag. It would have been easier if each category and its forum channels is in its own <table>. Or better yet, to not use <table> tag.
I have a pure CSS mod to separate the forum category list in its "own table". It's not perfect due to the challenge mentioned above but here it is:
https://vbmods.rocks/forum/vbulletin...oud-compatible
- Top
- Translate
- Bottom
Leave a comment:
-
Giving categories unique ID's
in vBulletin 4 categories are separated unlike vBulletin 5 which makes it harder to design the layout of the categories with CSS, looking for help to modify the display_Forums_list template in order to give each category a unique ID.
Example:
Thanks in advanceLast edited by glennrocksvb; 05-20-2022, 08:21 AM.Tags: None
- Top
- Translate
- Bottom
Users Viewing This Page
Collapse
There is 1 user viewing this forum topic.
- Guest
Latest Posts
Collapse
-
by desmomaxis this working in vb 6 as well?
tried but not working on my site.....Yesterday, 01:39 AM
Leave a comment: