DLE hacks
Expanding the functionality of the template engine
26-12-2022, 14:35
in the addnews.tpl file
1. we remove the standard output list of categories, the category tag
2. define the group [group=x] text [/group] where x is the group id
3. Output the categories of the categories that are needed, where x is the category id
<select name="catlist[]" id="category" onchange="onCategoryChange(this)">
<option selected value="x">category name</option>
</select>
4. There is 1 category in the list, and it is already selected by default
5. Using css, you can hide it, for example:
<select style="display: none;" name="catlist[]" id="category">
<option selected="x">category name</option>
</select>
6. at the output we get: publication in the category selected by default
P.S. in my opinion, a very simple solution (so you don't need to create a bunch of templates to add news, no edits in the engine)
Thanks for your attention!
26-12-2022, 14:35
26-12-2022, 15:14
26-12-2022, 13:38
There are no comments
Information
Users of Visitor are not allowed to comment this publication.