justanotherguy
Total posts: 88
03 Mar 2015 16:44

When an article is featured is there an icon or badge to indicate it that can be added to the simple record list template? If so may you please list the step to turn it on as I may have it turned off. All I am able to see is in the edit menu where I can choose not to have the item featured anymore.

Thank you in advance.

Last Modified: 05 Mar 2015


pepperstreet VIP
Total posts: 3,837
03 Mar 2015 18:18

Hello justanotherguy,

there is no default image or special parameter for a badge/icon. All templates expose a special CSS class to the featured item (or its container). As far as you have Twitter Bootstrap CSS loaded, you should see a "light green" background on featured records.

  • DEFAULT / TABLE template adds class success to the TR (row)
  • SIMPLE LIST template adds class success to the surrounding DIV
  • ADVANCED TABLE adds class success to the TR
  • BLOG * template adds class featured to the surrounding DIV

So, you are totally free in appearance and customization. You have to apply the necessary CSS classes and styles to your main template.css or custom.css etc.


* PS: Apparently the classes are not unified across the templates, I am going to open a separate topic for it. All should get featured and maybe even a bootstrap label color of choice, like success, info, warning, important, inverse). Maybe a template parameter with free input is also a flexible solution.


justanotherguy
Total posts: 88
03 Mar 2015 23:23

Wonderful. I was able to achieve what I was going after. Thank you so much for the information.


brianpat VIP
Total posts: 211
04 Mar 2015 20:07

Thanks pepperstreet. I want to place the word featured on each record, any idea how to do that. If I use :before and use content:"Featured", then the text featured is placed as a column in that row.


pepperstreet VIP
Total posts: 3,837
05 Mar 2015 06:49

brianpat I want to place the word featured on each record, any idea how to do that. If I use :before and use content:"Featured", then the text featured is placed as a column in that row.

Depends heavily on the template and markup. Can you tell which template you use, maybe you can supply a screenshot as well?

Maybe an issue with "position" property. I assume you need "absolute" for the badge... and this also requires a property "relative" on the surrounding container element!

Most likely there might be an issue with before/after and table rows! A valid row expects a TD for data and any other HTML element. It seems a pseudo-element can't be displayed correctly: Related article is here!!
So, if you use the Default Table template, you have to modify it anyway...


Either you apply the featured class to the TD or record title etc. ...

Or you create an extra SPAN-element and JTEXT for flexibility. i.e. multilingual and easy text-changes in language overrides manager. Maybe this should be a default feature in the included templates.

You may also try property "background" or "background-image" with a regular image file.

Powered by Cobalt