如何在Acumatica登录页面上替换图像 [英] How to replace images on Acumatica login page

查看:76
本文介绍了如何在Acumatica登录页面上替换图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要用自定义替换Acumatica登录页面上的图像。我尝试创建自定义插件,但无法使用以下代码找到目标:

  string targetDir = Path.Combine(PX.Data.Update.PXInstanceHelper.RootFolder, Icons); 

让我知道是否还有另一种方法。

解决方案


以下内容摘自Stack Overflow文档
的替换登录页面上的图像(


  • 在此文件夹中添加自定义图像。为了这个示例,我使用了Acumatica 4.2登录页面中的图像:





    请记住, 要替换登录页面上的所有图像 ,您必须在中添加最少数量的自定义图像IconsCustomized 文件夹,它是Acumatica网站 Icons 文件夹中最初存在的 login_bg *。* 文件的数量。如果自定义图像的数量少于Acumatica最初提供的数量,则多次使用同一幅图像(通过不同命名文件)是非常好的。


  • 现在登录到您的Acumatica应用程序,创建一个名为 LoginPageImages 的新自定义项目,然后在Customization Manager中将其打开。


  • 在Customization Manager中,导航至文件部分,然后单击添加新记录按钮以打开添加文件对话框:




  • 在添加文件对话框中,从 IconsCustomized 文件夹中选择所有文件,然后单击 Save





    现在自定义项目中的自定义登录页面图像,但是您仍然需要编辑路径,以便它们正确替换标准图像。


  • 在Customization Manager中,从文件菜单中选择编辑项目XML




  • 对于为您的自定义图片生成的所有 File 标签,请收取 AppRelativePath 属性设置为 AppRelativePath = Icons ... ,并将 SystemFile 属性设置为 True (对于当前位于图标文件夹中的那些图像),然后单击保存到数据库按钮完成:





    在发布自定义版本时,Acumatica将自动备份网站文件夹中当前存在的文件,这些文件将被来自具有 SystemFile 属性集 True 的自定义文件替换。


  • 如果您现在继续发布自定义项,很有可能文件系统中的某些文件已被修改。错误消息会出现。为防止出现此令人恐惧的消息,请在Customization Manager中打开您的项目,导航到文件部分,然后单击检测修改的文件以打开检测到的修改的文件对话框,然后点击放弃所有更改按钮:




  • 现在,您可以继续并发布自定义内容,以在登录页面上欣赏您的自定义图像:



    < a href = https://i.stack.imgur.com/mrj0N.jpg rel = nofollow noreferrer>



  • I need to replace images on the Acumatica login page with customization. I've tried creating a customization plug-in, but was not able to find the target with below code:

    string targetDir = Path.Combine(PX.Data.Update.PXInstanceHelper.RootFolder, "Icons");
    

    Let me know if there is another way to do this.

    解决方案

    The following content is from "Replacing Images on the Login Page" from Stack Overflow Documentation (archived here); copyright 2017 by RuslanDev; licensed under CC BY-SA 3.0. An archive of the full Stack Overflow Documentation content can be found at archive.org, in which this example is indexed by its topic ID: 9657, as example: 29809.

    To create a customization package replacing images on the login page, follow the steps below on your local Acumatica instance:

    1. Create a new folder in the Acumatica instance folder. For this example I added a folder called IconsCustomized in my local LoginImages instance:

    2. Add your custom images in this folder. For the sake of this example, I used images from Acumatica 4.2 login page:

      Keep in mind, to replace all images on the login page, you have to add at least as many custom images in your IconsCustomized folder as the number of the login_bg*.* files originally present in the Icons folder of your Acumatica website. It's perfectly fine to use same image or images multiple times (by naming the files differently), if the number of your custom images is less then what was originally provided by Acumatica.

    3. Now login to your Acumatica application, create new customization project called LoginPageImages and open it in Customization Manager.

    4. In Customization Manager, navigate to the Files section and click the Add New Record button to open the Add Files dialog:

    5. In the Add Files dialog, select all files from your IconsCustomized folder and click Save:

      Now you have the custom login page images in the customization project, but you still need to edit the path so they correctly replace the standard images.

    6. In Customization Manager, select Edit Project XML from the File menu:

    7. For all the File tags, generated for your custom images, charge the AppRelativePath attribute to AppRelativePath="Icons..." and set the SystemFile attribute to True for those images, that currently present in the Icons folder, then click the Save to Database button when done:

      While publishing customization, Acumatica will automatically backup files currently present in the website folder, which are replaced by files from the customization with SystemFile attribute set True.

    8. If you now proceed with publishing the customization, it's very likely for Some files have been modified in the file system. error message to show up. To prevent this quite frightening message from appearing, open you project in Customization Manager, navigate to the Files section and click Detect Modified Files to open the Modified Files Detected dialog, then click the Discard All Changes button:

    9. Now you can go ahead and publish the customization to enjoy your custom images on the login page:

    这篇关于如何在Acumatica登录页面上替换图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆