0

There are few things I am trying to accomplish here, I want to add a phone number to the "create my account" form of my website, along with that I want to add a style sheet to my html that links to that phone number, (kind of creates a user ID, with phone number), would this be possible?

I am using Magento 2 via AWS lightsail.

Thank you for your help.

MGento
1,51910 silver badges22 bronze badges
asked Feb 10, 2018 at 13:52
27
  • hey, what do you mean by adding a style sheet to your html, do you want to reference a stylesheet in the head of the document? If so, do you have a theme? Commented Feb 13, 2018 at 10:58
  • 1
    Hey John, Thank you Commented Feb 14, 2018 at 19:48
  • Yes, i do have a theme... but i need to attach it to my html under content-page (magento dashboard). I though if i can upload the files to AWS cloud 9 it should "link" to my html code but it didn't... is there another way around with with/without using cloud 9? maybe through magento dash? Commented Feb 16, 2018 at 5:15
  • do you know the URL you are linking to, it's definitely possible if you know the URL you're linking to, Magento actually comes with a feature where you can insert scripts & stylesheets before the head closes in your html Commented Feb 16, 2018 at 7:42
  • 1
    Hey John, Thank you for getting back to me.. Also thank you for all your help this far. I will follow the instructions that you gave me. Regards, Commented Mar 6, 2018 at 6:10

1 Answer 1

0

From my conversation in the comments with you You're going to need to go to paste your CSS inside web/css and call it something like, lets say function.css. Save this inside that folder, next go to Vendor/Theme and if there's a Magento_Theme folder there go inside layout and click on default_head_blocks.xml. If not, you will need to create this file structure. (vendor/theme/magento_theme/layout/default_head_blocks.xml). Inside here you're going to want to insert <link rel="stylesheet" type="text/css" href="path/to/file/theme.css"> line just after

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
 <head>

if you're making this file you then want to write

 </head>
</page>

after it. Save, flush cache and reload the page and the file should be referenced in your head. I hope I've helped

answered Feb 20, 2018 at 9:07

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.