WBCE/Blog-Menu-for-NWI
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more about the CLI.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
----------------------------------------------------------------------------------------- Code snippet NwI Blog Menu v0.3 Licencsed under GNU written by Erik Coenjaerts (Eki), updated by florian for WBCE / News with Images ----------------------------------------------------------------------------------------- ***************************************************************************************** SHORT INSTALLATION GUIDE: ***************************************************************************************** o download the Blog Menu zip file from the WBCE Addons repository o log into the backend and install the module as usual o Be sure to have the module News with Images (not "News") installed ***************************************************************************************** USING THE SNIPPET FUNCTION: ***************************************************************************************** Once the module is installed, it can be invoked either from the index.php file of your template or from any code module section. From template index.php: <?php display_blog_menu(8); ?> From a code module: display_blog_menu(8); (8 = example, replace with actual page id of the News with Images section to display) ***************************************************************************************** ADDITIONAL PARAMETERS ***************************************************************************************** For a more customised output, you can pass over serveral parameters to the function explained below. display_blog_menu($page_id,$date_option,$group_header,$history_header) Optional Parameters: page_id... the page_id of the news page you want to generate the Blog Menu from date_option... 0:=count articles according the posted date (default); 1:= count articles according the published date group_header... header above the group menu (default: '<h1>Categories</h1>') history_header... header above the history menu (default: '<h1>History</h1>') display_option... 0:=show both history and categories (default); 1:=show only history; 2:=show only categories Example for customised call: <?php display_blog_menu(15,1,'<h2>categories</h2>','<h2>history</h2>',2);?> ***************************************************************************************** TROUBLE SHOOTING ***************************************************************************************** - pass over at least the first argument ($page_id) - make sure you use the page_id of the NWI page, not their section_id - mask text with "your text " or 'your text ' - within your template index.php file use: <?php display_blog_menu(); ?> - within a code2 module section use: display_blog_menu(); - remind the ; at the end of the code line ***************************************************************************************** STYLE THE OUTPUTS ACCORDING YOUR NEEDS ***************************************************************************************** The output can be customized to your needs without touching the code itself, by the use of CSS definitions. Open a code page and enter the following code: echo "<div id=\"myblog\">"; display_blog_menu(12); echo "</div>"; The additional div section can be used to restrict the style defintions to the blog menu only, without influencing the rest of your layout.
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published