Next-page button for the Gbook moduleShow guestbook replies from the Gbook module for CMSMS with "endless scrolling" instead of a paginated view.
Tips, tricks and tutorials to make it even easier to work with CMS Made Simple. CMSMS is an open source Content Management System. It provides website developers with a simple, easy to use utility to allow building websites.Smarty Templating BasicsIn this tutorial you get an oversight of the most useful Smarty templating codes, including practical examples.Use module template output in multiple content blocksHow to use generated module content at different spots in your page lay-out. Gotta love Smarty.CGBlog Admin article list usability improvementsAs a frequent user of the CGBlog module, I sometimes miss the overview of planned blog articles. Using the core module_custom feature you can simply adapt Admin templates to your likings.The power of Template Inheritance and the CMSMS Design ManagerTemplate Inheritance is an approach to managing Smarty templates in CMS Made Simple™ that resembles object-oriented programming techniques.Getting the image dimensions in SmartyUsing the height and width of the images and thumbnails in your Gallery templates should be pretty straightforward, not? Well I guess it wasn't... Until now!Adding previous and next links to the modules detail pagesThis tutorial demonstrates the power and simplicity of Smarty template code by using it to add previous and next buttons to the CMS Made Simple News module without any UDT.Smarty scope examplesCMSMS 1.12 introduces the concept of 'scopes' in Smarty templates. This version of Smarty does not treat each and every variable as a global. This will solve problems with...Printer-friendly pages without a moduleThere is really no need for a module to create printer-friendly pages at your CMS Made Simple™ website. In this tutorial I will show you how you can do this!Website style switcherTo make a website accessible for visitors with visual impairments I needed a style switcher to change the output of the template. Not only for text and background colors, but also for (layout) images.Breadcrumbs for the Products moduleThere isn't one method for adding a breadcrumb trail to the Products module for CMS Made Simple™. Climbing down the 'hierarchy ladder' to the product, you pass three templates and each template has its own method.Group Company Directory items in alphabetical order and add shortcutsThe Company Directory module is good to show an overview of companies and contacts at your CMS Made Simple™ website. With a little adjustment to the summary template you can group the output in alphabetical order and add shortcuts to the entries.Create a progress bar with Smarty and CSSIf you want show your visitors i.e. the received money vs. the goal for a charity collection or show the still available tickets to a concert, it is nice to show a progress bar. You can do this with a few lines of Smarty and a bit of CSS.A XML or RSS-feed reader with plain SmartyCreate your own XML or RSS-feed reader with plain Smarty, there are no external modules or plug-ins needed!Easy way to combine and minify JavaScript files and codeLoading separate JavaScript files delays the rendering of a web page. Having a large CMS Made Simple website with multiple JS files, it can have a serious effect on your total page load time. Combine the files into one JS file - just like the {cms_stylesheet} tag does for stylesheets - is a solution for this. I was looking for a simple method to achieve this, but...Using strip tags in templates and stylesheetsStrip white space in templates and stylesheets can improve your website in different ways. But what are the best spots to put the strip tags? I always forget it, so will post some examples here to help myself, uhh you :)Create your own slider for news articles or imagesI will describe the basics of how to create a slider, you can use it yourself in your CMS Made Simple module templates. Think of rotating summary views of the News or CGBlog modules or rotating company logos in the CMSMS Banners module.Call a Smarty tag from a UDTFor my pneumatic tube website I used the Products module for CMS Made Simple as an image library. The module was great for this purpose, I can add images and can store additional information in custom fields. But for adding a single image to a page I needed a large module tag with parameters. If at some point I want to change something here I need to change all tags in the pages... I searched and found a method to make this easier for me...Change website lay-out depending on page contentWith this sample template you have three content blocks, the frontend of the website will change depending on the presence of content in these blocks. There is no need for multiple templates.Set, read and debug cookiesA cookie, also known as an HTTP cookie, web cookie, or browser cookie, is usually a small piece of data sent from a website and stored in a user's web browser while a user is browsing a website. You can use cookies to store user settings for i.e. website styling, language preferences, etc. I will show you how to set, read and debug cookies at your CMS Made Simple website.Count days, is this page recent?With this User Defined Tag you can calculate the age of a content page and use it in your page/template to show a notice or style some text.Hide forms for certain IP addressesHide website forms for certain IP addresses (partial banning)Make a link to a fileUser Defined Tag to create a link to open a file, followed by the filesize.Count itemsSmall User Defined Tag that count items in an array, useful for several modules like News, CGBlog, Products, etc.Add a class to all page(groups)You can use this small tag to get yourself a class name for the current page. This is very useful when you want to apply particular CSS style only to a certain page, or a subset of pages.Test templates without breaking the frontendYou need to do some tests at your website. But you don't want to break the frontend for your visitors. A simple solution using Smarty.Sort array modifierSorting the output of an array with this simple Smarty modifier.