@alanLeyva said:
The plugin is "Basic Pages" (an application actually)
I just overwrite the index.php file for a custom index.tpl file, the .tpl was so I can put the "asset"s to print the categories latest post.
@alanLeyva can you elaborate more on how you used the "Basic Pages" application to bring about your desired result? Where is the location of the index.php file you overwrote?
Comments
Since you are using Basic Pages and a custom theme, put the following in your theme hooks file:
And replace the
SetData()
method in/plugins/LatestPostList/modules/class.latestpostlistmodule.php
with: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.
Thank you very much @hgtonight !
That was it.
Maybe considering put that feature onto the default plugin wold be nice.
Thank you once again.
Sorry to bother you once again.
How can I target to the ParentCategoryID?
I tried with this
Changing $CategoryID to $ParentCategoryID.
But that did't work
Hope you can help.
Just pass in the parent category ID in your theme hooks file.
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.
it didn't work
I guess is because we don't have any discussion in the parent category itself.
I try making an array of the subcategories of the same parent category.
But that did't work either.
Is there a we to target the parent category id instead of just every single category?
My DB looks like this
lets say I need to target to the number 8 parent ID
Oh, you want to display posts from a specific category AND it's sub-categories.
Do your parent categories only acting as headings, or can you post in them as well?
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 can be done easily. See my previous answer about navigating the category tree.
My shop | About Me
This is definitely beyond the scope of my plugin, but you just need to to modify the
LatestPostListModule::SetData()
method to do what you want.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.
@alanLeyva can you elaborate more on how you used the "Basic Pages" application to bring about your desired result? Where is the location of the index.php file you overwrote?