Changing element attributes if user is logged out and is on the very main page.

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Post Reply
HamiltonDev
Registered User
Posts: 2
Joined: Wed Aug 15, 2018 12:04 pm

Changing element attributes if user is logged out and is on the very main page.

Post by HamiltonDev »

Basically, what I've got right now is an if statement where the user is logged out, then append a class attribute to an element. The class will change the element to a grid to have one primary cell and a secondary cell (see image). However, since this code is in the overall_header.html template, it interfears with all other styles, where the quick-login module is not shown.

What are my possibilities of changing this if statement to?

Code: Select all

<div class="inventea-wrapper inventea-content <!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->inventea-grid<!-- ENDIF -->" role="main">
Image
User avatar
eeji
Registered User
Posts: 1461
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

Re: Changing element attributes if user is logged out and is on the very main page.

Post by eeji »

How is it interfering with other styles? If you use this line in your prosilver overall_header.html and other styles are inheriting it, just move the line to an overall_header.html file in the styles that need it.
My phpBB styles: phpbbstyles.iansvivarium.com
My "board": iansvivarium.com
(yes, it's running phpBB!)
HamiltonDev
Registered User
Posts: 2
Joined: Wed Aug 15, 2018 12:04 pm

Re: Changing element attributes if user is logged out and is on the very main page.

Post by HamiltonDev »

eeji wrote: Wed Aug 15, 2018 7:18 pm How is it interfering with other styles? If you use this line in your prosilver overall_header.html and other styles are inheriting it, just move the line to an overall_header.html file in the styles that need it.
Sorry, I meant it interferes with other templates in the style (being a we_universal edit, based on prosilver).
User avatar
eeji
Registered User
Posts: 1461
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

Re: Changing element attributes if user is logged out and is on the very main page.

Post by eeji »

I don't get what you mean "interfering"? What exactly is happening?
My phpBB styles: phpbbstyles.iansvivarium.com
My "board": iansvivarium.com
(yes, it's running phpBB!)
Post Reply

Return to “[3.2.x] Styles Support & Discussion”