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 » Wed Aug 15, 2018 1:06 pm

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
Jr. Style Validator
Posts: 887
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 » 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.

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 » Thu Aug 16, 2018 3:48 am

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
Jr. Style Validator
Posts: 887
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 » Thu Aug 16, 2018 5:51 pm

I don't get what you mean "interfering"? What exactly is happening?

Post Reply

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

Who is online

Users browsing this forum: plopbellie and 11 guests