Grid layout

Ehren

Administrator
Staff member
Customer
Messages
4,577
Website
www.xenfocus.com
If you'd like to display your forums in a grid layout, browse to Style Properties > Xenfocus: Grid layout and enable Grid view.

A toggle will appear in the front-end Theme Editor, allowing your members to switch back to a table layout if they wish (assuming you've given them permission under Xenfocus: Theme Editor).

If you've enabled Wallpaper design, each grid item can be assigned a background image or hex color. The hex color can be defined by the two color settings under the Wallpaper design setting. To assign an image, first find out the id of your node. To do this, simply visit your index page and hover over the forum title. The link (which generally appears at the bottom of your browser) will show you the id at the very end. This example uses 2.

node-id.png


Next, create your image, name it 2.jpg, and upload it to /styles/xenfocus/images/node-wallpapers/
Finally, enter 2 in the Wallpaper images field. If you need to apply images to multiple forums, repeat this process for each image, and separate the id's with a comma in the Wallpaper images field, like so:
Code:
2,8,17
 
Last edited:

Ehren

Administrator
Staff member
Customer
Messages
4,577
Website
www.xenfocus.com
To enable the grid layout when viewing subforums on a topic list:

1. Open the forum_view template file and find:
Code:
    <xf:ad position="forum_view_above_node_list" arg-forum="{$forum}" />
    <div class="block">

2. Change to:
Code:
    <xf:ad position="forum_view_above_node_list" arg-forum="{$forum}" />
    <div class="block block--category">
 

Ehren

Administrator
Staff member
Customer
Messages
4,577
Website
www.xenfocus.com
Hello,

The grid settings are available in every Xenfocus theme. Make sure you're not trying to achieve the same thing on a theme from a different designer since the settings won't be there.

Screen Shot 2019-12-04 at 8.15.02 am.png
 

Escanor

New Member
Messages
2
1864

1865

1866

These are the style properties I have, I guess I did something wrong when installing my Theme? I have the Uniform Pro theme, thank you!
 

Ehren

Administrator
Staff member
Customer
Messages
4,577
Website
www.xenfocus.com
Heyy!

This is untested, but does adding this to extra.less help?
Less:
// Assign node wallpapers
<xf:if is="property('xenfocus_gridImage') AND property('xenfocus_gridWallpaper')">

    @supports (display: grid){
        .focus-grid{
            .block--category{               
                .node--id5 .node-body {
                    background-image: url('https://site.com/image.jpg');
                }
                .node--id9 .node-body {
                    background-image: url('https://site.com/image.jpg');
                }
                .node--id15 .node-body {
                    background-image: url('https://site.com/image.jpg');
                }
            }
        }
    }

</xf:if>
 

AlteredFancy

New Member
Messages
12
Website
poissondore.fr
Heyy!

This is untested, but does adding this to extra.less help?
Less:
// Assign node wallpapers
<xf:if is="property('xenfocus_gridImage') AND property('xenfocus_gridWallpaper')">

    @supports (display: grid){
        .focus-grid{
            .block--category{              
                .node--id5 .node-body {
                    background-image: url('https://site.com/image.jpg');
                }
                .node--id9 .node-body {
                    background-image: url('https://site.com/image.jpg');
                }
                .node--id15 .node-body {
                    background-image: url('https://site.com/image.jpg');
                }
            }
        }
    }

</xf:if>
Less:
// Assign node wallpapers
<xf:if is="property('xenfocus_gridImage') AND property('xenfocus_gridWallpaper')">

    @supports (display: grid){
        .focus-grid{
            .block--category{               
                .node--id15 .node-body {
                    background-image: url('https://contenu.poissondore.fr/img/wallpaper/1.jpg');
                }
                .node--id6 .node-body {
                    background-image: url('https://contenu.poissondore.fr/img/wallpaper/2.jpg');
                }
            }
        }
    }

</xf:if>
For some reason it does not work :unsure:
 

AlteredFancy

New Member
Messages
12
Website
poissondore.fr
All fixed :)

If possible, I'd recommend using smaller images for your backgrounds. They're currently 1500x844 pixels in size, but the actual node is only 560x66.
Thank you so much :love: Give me a paypal address, Ill give you a tip! How did you managed to fix it by the way?
EDIT: I've seen that you've just removed the xf & support lines ;)
 
Last edited:
Top