HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Custom Vanilla Theme
phalc0nline
New
Hi! I have some questions:
1. I know panel configurate in config.default.php, but I can't enable/disable modules. Can anyone sent me example?
2. I create new theme with my module views and layout, but I can redefine only layout. What I must do foe redefine modules views? Please, take me examples.
Thanks.
0
Comments
When you create a new theme, create also a file
\themes\YourFancyTheme\class.themehooks.php
with following code:Thank you R_J! It's great solution. What else do I need to know to create new theme?
You didn't need to know that for a nice theme. It all depends on what you try to achieve. Just start your theme and whenever you get stuck do a research on this forum for someone who asked a similar question and if you find nothing, don't hesitate to ask. If you can give a visual an example of what you try to achieve you make answering more easily, but if you describe your problem well enough, it shouldn't be a problem to offer a solution, either.
How I can anable Module In content, also I use
echo Gdn_Theme::Module('SideMenuModule');
, but in profile edit page that dosn't workConfig didn't work, also $this->AddModule('SideMenuModule', 'Content');
You need to hook into the controller and add the module. E.g.:
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Usage
echo Gdn_Theme::Module('SideMenuModule');
What I do wrong?
If you are unsetting a module that is added via a plugin, you need to make sure your code runs after the module gets added. Or modifying the plugin to not add the module in the first place.
Why are you looking to add the SideMenuModule to the Content asset?
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
I must have navigation links in every content profile edit view like Select tag. Do you propose write inline code in view without module?
I don't quite understand what you are asking. Perhaps a screenshot showing what you are trying to accomplish would help me.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
I want have this links in content
I want add to content tabs