Close

General Discussion

joster
10 years ago
#3539 Quote
Avatar
  • 130
Has the Forum been styled for Alfresco yet? Last time I checked, it wasn't...
Boyko
10 years ago
#3542 Quote
Avatar
  • Moderator
  • 1570
joster wrote:
Has the Forum been styled for Alfresco yet? Last time I checked, it wasn't...

Hi joster,

Yes, the forum in Alfresco is styled. Please update the theme to get it styled.

Thanks
Regards,
Nop-Templates.com Team
lftalero
10 years ago
#3568 Quote
Avatar
  • 18
I'd like to make the main background image (usually background1.jpg ) to be changed aleatory every time a different page is visited.

A script would choose between 1 and n, been n the number of images you have, and then just set the name of the new image before loading the page.

Any suggestion about how could this script work and where could it  be placed?
Support
10 years ago
#3572 Quote
Avatar
  • Moderator
  • 1044
Hi LFTALERO,

This is an interesting idea. I suppose there are a lot of ways you can do that.
One place where you can place the new functionality might be to place it in the Themes/Alfresco/Content/Scripts/Alfresco.js file, but you should be careful in a future upgrade to merge this change to the new version of the theme. Alternatively you can create your own separate js file, called MyCustomScript.js for example and include it in the Themes/Alfresco/Views/Shared/Head.cshtml file just as the Alfresco.js file is included. Thus your functionality will be separate and in a future upgrade you would need just to copy this file and include it in the new version of the theme.

As to the actual functionality you can implemented it for example on a page load a java script can change the background-image property of the body element. You can have a logic that pics a number from 1 to n and sets the background-image property of the body to be background-n.jpg for example. You can place these images in a known folder, so that you can guarantee that the image will be always available on your server. Something like this:


$(document).ready(function () {
    var n = {your_logic_for_generating_a_random_number};
    var backgroundImageFileName = 'url(/Themes/Alfresco/Content/{My_Images_Folder_Name}/' + 'BackgroundImage_' + n + ')';

    $('body').css('background-image', backgroundImageFileName)

});

where
{your_logic_for_generating_a_random_number}; is a js function which will generate a random number form 1 to n;
{My_Images_Folder_Name} is a folder created in Themes/Alfresco/Content folder. There you can place all your images that will be used as background images. All background images should be with names "BackgroundImage_1", "BackgroundImage_2", ... , "BackgroundImage_n".

Hope that helps!


Should you need any further help, please do not hesitate to contact us again!
ylechasseur
10 years ago
#4188 Quote
Avatar
  • 104
One more question ....

When I import a picture for a category, it reduce the picture size as a thumb. When I put the category as featured, the picture size is to small.. I am trying to find out where to put the right parameters and I didn't find it yet..

I am sure you have a pretty good idea about it :-)

Have a nice day

yves
ylechasseur
10 years ago
#4190 Quote
Avatar
  • 104
Hi again ...

One more question, on the front page slider, I rather integrated my logo on my slider image than have it over it.

If I remove the logo in the front page in the code, does it will appear on all the other pages ?

I almost done.. simple tweaking and some minor adjustment ..

thanks for all

yves
Support
10 years ago
#4194 Quote
Avatar
  • Moderator
  • 1044
ylechasseur wrote:
One more question ....

When I import a picture for a category, it reduce the picture size as a thumb. When I put the category as featured, the picture size is to small.. I am trying to find out where to put the right parameters and I didn't find it yet..

I am sure you have a pretty good idea about it :-)

Have a nice day

yves


Hi Yves,

You can set 450 for the "Category thumbnail image size:" . This is how it is done on our demo.
This settings is available in administration -> configuration -> settings -> media settings.

Hope that helps!
Support
10 years ago
#4195 Quote
Avatar
  • Moderator
  • 1044
ylechasseur wrote:
Hi again ...

One more question, on the front page slider, I rather integrated my logo on my slider image than have it over it.

If I remove the logo in the front page in the code, does it will appear on all the other pages ?

I almost done.. simple tweaking and some minor adjustment ..

thanks for all

yves


Hi Yves,

There is a setting from the administration for uploading a logo, so you can remove it from there too. Thus no logo will be displayed on any page. If you have your logo in the slider that is shown on the home page, the slider with the logo will be displayed on the home page only.

Please let us know whether you want to have your logo displayed on all other pages, so that we can help you with more details.

Best Regards!
ylechasseur
10 years ago
#4198 Quote
Avatar
  • 104
Hi ... it was to easy .. I never look in this section.. good to know..

I was wondering so much how you did !!

For the logo over the slider, I will try again to make it nice ..

if I am not able to do it,, I will certainly need your help..

Thanks a lot ..again :-)

Yves
lftalero
9 years ago
#8426 Quote
Avatar
  • 18
I'm personalizing the style for some of the interface elements.
I'm doing as indicated here http://www.nop-templates.com/how-to-modify-a-nop-templates-nopcommerce-theme and here http://www.nop-templates.com/boards/topic/933/bugs/page/3, but the order the style sheets are loaded keeps the same: the last one is the Alfresco default Styles.css, overriding my custom file.

Here is the content of my current _Root.Head.cshtml file:
@using Nop.Core
@using Nop.Core.Domain.Common;
@using Nop.Core.Infrastructure;
@Html.NopCssFiles(this.Url, ResourceLocation.Head)
    <link type="text/css" rel="Stylesheet" href="@Url.Content("~/Themes/Alfresco/Content/css/custom-user-styles.css")" />
    @Html.Widget("head_html_tag_after_css_files_alfresco")
 
@{
    var displayMiniProfiler = EngineContext.Current.Resolve<Nop.Core.Domain.StoreInformationSettings>().DisplayMiniProfilerInPublicStore;
    
    //resources
    
    Html.AppendScriptParts("~/Scripts/public.ajaxcart.js");
    Html.AppendScriptParts("~/Scripts/public.common.js");
    Html.AppendScriptParts("~/Scripts/jquery-migrate-1.2.1.min.js");
    Html.AppendScriptParts("~/Scripts/jquery-ui-1.10.3.custom.min.js");
    Html.AppendScriptParts("~/Scripts/jquery.validate.unobtrusive.min.js");
    Html.AppendScriptParts("~/Scripts/jquery.validate.min.js");
    Html.AppendScriptParts("~/Scripts/jquery-1.10.2.min.js");
    //X-UA-Compatible tag
    var commonSettings = EngineContext.Current.Resolve<CommonSettings>();
    if (commonSettings.RenderXuaCompatible)
    {
        Html.AppendHeadCustomParts(string.Format("<meta http-equiv=\"X-UA-Compatible\" content=\"{0}\"/>", commonSettings.XuaCompatibleValue));
    }
    var browser = Request.Browser;
    if (browser.Browser == "IE" && browser.MajorVersion == 8)
    {
        Html.AppendHeadCustomParts("<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"/>");
    }
}
<!DOCTYPE html>
<html @Html.Partial("LanguageAttributes")>
<head>
    <title>@Html.NopTitle(true)</title>
    <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
    <meta name="description" content="@(Html.NopMetaDescription())" />
    <meta name="keywords" content="@(Html.NopMetaKeywords())" />
    <meta name="generator" content="nopCommerce" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
     @Html.NopHeadCustom()
    @*This is used so that themes can inject content into the header*@
    @Html.Partial("Head")
    @Html.Widget("head_html_tag")
    @Html.NopCssFiles(this.Url, ResourceLocation.Head)
    @Html.Widget("head_html_tag_after_css_files_alfresco")
    @Html.NopScripts(this.Url, ResourceLocation.Head)    
    @Html.NopCanonicalUrls()
    @Html.Action("RssHeaderLink", "News")
    @Html.Action("RssHeaderLink", "Blog")
    @*Favicon - upload favicon.ico file to the root directory*@
    @Html.Action("Favicon", "Common")
    @if (displayMiniProfiler)
    {
        @StackExchange.Profiling.MiniProfiler.RenderIncludes()
    }
    <!--Powered by nopCommerce - http://www.nopCommerce.com-->
    <!--Copyright (c) 2008-2014-->
</head>
<body>
    @RenderBody()
    @Html.NopCssFiles(this.Url, ResourceLocation.Foot)
    @Html.NopScripts(this.Url, ResourceLocation.Foot)
</body>
</html>



And here is the content of my Head.cshtml file when I had the custom css file included in it (I removed the extra line when trying with the _Root.Head.cshtml file):
[code]@using Nop.Web.Framework;
@using Nop.Core.Infrastructure;
@using Nop.Web.Framework.UI;
@using Nop.Core;
@{
    var supportRtl = EngineContext.Current.Resolve<IWorkContext>().WorkingLanguage.Rtl;




    var browser = Request.Browser;
    var isIeEightOrLess = false;
    if (browser.Browser == "IE" && browser.MajorVersion <= 8){
        isIeEightOrLess = true;
    }
    if (isIeEightOrLess)
    {
        if (s