Moving Categories List out of Panel and into Main Content Area
On the /categories/category-name page, can I move the Categories list out of the Panel and into the main Content area? If so, how would I go about this?
Best Answer
-
hgtonight MVP
Since you are hacking application files, you could just change it to
return 'Foot';
The module sort order of any asset is determined through a configuration option on a per controller or application basis. There are four assets used in Vanilla by default: head, panel, content, foot.
You can also create any asset target you want in your default.master.tpl file using the
{asset name="CustomAssetName"}
smarty tag. Then you wouldreturn 'CustomAssetName';
in your module'sAssetTarget()
method. This is my preferred method when creating custom modules for clients.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.
5
Answers
@jbregar
Which version of Vanilla are you using?
Is your default.mater a php or tpl file?
Do you want it on every page?
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.
Not on every page, no. Only the pages it currently appears in the Panel for. I just want to move it from the Panel to the main content area.
Quick hack that destroys maintainability: Assuming you are running 2.0.18.8, modify your
/applications/vanilla/modules/class.categoriesmodule.php
file line 30 fromreturn 'Panel';
toreturn 'Content';
A better way: Implement a plugin that replaces the current categoriesmodule with a module that extends the current categoriesmodule while setting the AssetTarget method to return 'Content'.
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.
That worked for now, I'll implement the plugin soon. So, now it's above the list of current subcategories... any way to move it below? Where's the order defined for Panel and Content areas?
Since you are hacking application files, you could just change it to
return 'Foot';
The module sort order of any asset is determined through a configuration option on a per controller or application basis. There are four assets used in Vanilla by default: head, panel, content, foot.
You can also create any asset target you want in your default.master.tpl file using the
{asset name="CustomAssetName"}
smarty tag. Then you wouldreturn 'CustomAssetName';
in your module'sAssetTarget()
method. This is my preferred method when creating custom modules for clients.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.
@hgtonight: Can this also be done without hacking modules. For example if you deploy a theme later to many users. It would be easier not to describe them what modules they have to hack in what way to make the theme work but integrate everything in the theme folder. Thanx for a hint.
I'm working working on 2.0.18.8 and 2.2.
@phreak you can use your theme hooks file as a plugin and implement it that way. No hacking necessary.
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.