By Fred on Monday, 16 December 2013
Posted in General Issues
Replies 5
Likes 0
Views 1K
Votes 0
So I will try to do my best to explain how I have this setup and how I have come to fix 99% of my issue but I need to resolve that last 1%

The Issue I'm having is that my Home Page styling is loading on other pages within EasySocial, the reason its loading on other pages within ES is because I have my default "Home" set to Unity with a "Page Class" of 'frontpage-header' that is located in my CSS.

Now I've found a nifty little trick to solve the CSS 'frontpage-header' from loading within ES Sub pages by created a Menu and SEO for each item in EasySocial but don't display the menu. However there is one Sub page in ES that I can't create a menu for without breaking things and that is photos. When clicking on a Photo on my "Home" page it will load my 'frontpage-header' CSS. But if I click on the persons name then the photo it wont load my 'frontpage-header' CSS.

Now, I can create a Menu Link to "Photos" but I have to select a person otherwise it doesn't work.

So I have a suggestion, which kinda makes sense to do it this way rather than the way its done now.

Right now when clicking on a Photo it takes you to a URL of domainname.com/photos/.../.../..//...

I think the URL should reflect on the persons name, so it would be something like this. domainname.com/FredD/AlbumName/PhotoName.jpg

This way the URL will use the Usersname and would fix the issue of the CSS loading all over ES as long as I have a hidden menu. Now if you have another way that I could load the custom CSS just on the front page that would be great but the only way that I know how is to do is through the menu item with Page Class.

Thanks
Hello Fred,

Hm, not entirely sure if I understand you here but you should add some custom php codes into your template's index.php to load specific css files. For instance, if the menu id of your front page is 1 then you can add a code that looks like below:


<?php if( JRequest::getVar( 'Itemid' ) == 1 ){ ?>
<link href="....." />
<?php } ?>
·
Monday, 16 December 2013 23:17
·
0 Likes
·
0 Votes
·
0 Comments
·
That doesn't work because the problem is that photos can not have a menu ID assigned to them so since it doesn't have a menu ID to photos its is going to load the CSS for the home page... If you go to my site, on the home page scroll down and you will see an image I posted in my stream, click that image and you will notice the huge orange area there. Its grabbing the CSS from my home page rather than doing the other CSS I have for everything else.

I found creating hidden menus linked to components stops that from loading on other pages as those pages are no longer a child to the home page. But Photos become a Child to the Home Page since I can't set a menu ID for Photos. Now if Photos were embeded with the persons profile, it would be a Child to the Profile Menu ID I created and wouldn't load the Home Page CSS.
·
Tuesday, 17 December 2013 02:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Fred,

Ah I see. Yes, we don't actually have a menu association for all photos yet at this point of time
·
Tuesday, 17 December 2013 12:58
·
0 Likes
·
0 Votes
·
0 Comments
·
I think what I may have to do is redesign my home page back to a normal article layout and use ES Modules instead of using my Home page as Unity. Or is there a default php file for the Photos layout? I could use your code above and load a CSS that overwrites the code I need.
·
Tuesday, 17 December 2013 20:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Hm, not too sure which "default.php" are you referring to here Fred but I do think using modules would be a much better choice if you want to display a mashup of contents.
·
Wednesday, 18 December 2013 12:07
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post