On Wednesday, 24 April 2013 at 20:56, Andi North wrote:
Hi all,It would be great for there to be a class (or classes) added to the body of the page based on one or more of the following criteria:
- Template Name (i.e. default.html (template) would be <body class="temp-default">
- Page Name (i.e. my-account.html would be <body class="my-account">
- Page ID (like above but instead of <body class="my-account">, you could have <body class="page-id-12">)
I would also suggest allowing a <body class="user-logged-in"> for when a user is logged in so that you could change a user menu for instance.
Examples of existing usage:WordPress uses a php function <?php body_class(); ?> to add several classes to the body tag. It is very useful to target specific templates quickly and easily without adding extra markup (i.e. <div>'s)
Hope this helps, if you want anymore information or use cases let me know.Andi
--
You received this message because you are subscribed to the Google Groups "Silk Web Toolkit User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to silk-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.