ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How to edit HTML code in ExpressionEngine?

September 26, 2011 7:46pm

Subscribe [3]
  • #1 / Sep 26, 2011 7:46pm

    Success99

    5 posts

    Hello,

    I am not an expert web developer and am very confused about this.

    This might sound very basic, but how can I edit the HTML source code of my webpage? I can only seem to find a way to edit the “template” but not the actual source code of my webpages?

    I had my website designed by professionals, but need to simply edit a few lines of code on one of my web-pages and cannot figure out how. I know how to edit basic HTML code but cannot find it in EE.

    Any help would be appreciated. Please be detailed and help me navigate directly to the “edit” page showing me a breadcrumb map. e.g. first step > second step > third step

    Thank you!

  • #2 / Sep 27, 2011 9:21am

    Boyink!

    5011 posts

    Hi -

    Welcome to EE. 😉

    At a high level, channels (or weblogs in EE1) hold content.  Templates store HTML/CSS and the EE tags that retrieve content from Channels.  That source code you are looking at is dynamically generated by EE using a template which pulls content from the channels.

    In other words, it doesn’t exist in that form on the server.

    To change what gets rendered you need to find the template responsible for generating that page, and edit the template.  In some cases the content also has HTML (links, lists, etc) that show up in the rendered code.

    Do you know what template generates that page?  You can usually determine by looking at the URL:

    http://mysite.com/index.php/template_group/template

    Index.php might be removed, however.

    If you can find the template and still need help, post the template code here with what you’re trying to change.

  • #3 / Sep 27, 2011 9:40am

    ralph.m

    225 posts

    I had my website designed by professionals, but need to simply edit a few lines of code on one of my web-pages and cannot figure out how.

    It sounds like the web developer has not given you access to the actual templates. This is an option that a web developer will normally turn off for clients. If this is the case, you’ll need to go back to the developers and ask them to give you more access, or give you their own log in details as SuperAdmin.

  • #4 / Sep 27, 2011 2:31pm

    Success99

    5 posts

    Hi -

    Welcome to EE. 😉

    At a high level, channels (or weblogs in EE1) hold content.  Templates store HTML/CSS and the EE tags that retrieve content from Channels.  That source code you are looking at is dynamically generated by EE using a template which pulls content from the channels.

    In other words, it doesn’t exist in that form on the server.

    To change what gets rendered you need to find the template responsible for generating that page, and edit the template.  In some cases the content also has HTML (links, lists, etc) that show up in the rendered code.

    Do you know what template generates that page?  You can usually determine by looking at the URL:

    http://mysite.com/index.php/template_group/template

    Index.php might be removed, however.

    If you can find the template and still need help, post the template code here with what you’re trying to change.

    Thank you for your help! Yesterday I ended up finding the “template” section for my site. I am not sure if I have done this correctly although please take a look at what I did…

    The “template” was written in some type of formula code, something of which I did not understand. What I did was go to the live web page and copy the source code, then paste that code within the “template”, and removing what “formula” code was there in the first place.

    I then clicked “update” and my webpage updated and still displayed correctly. I changed a line of text to be sure that it was indeed updating, and it appears that I can simply enter the HTML in the “template” channel (if that’s what you call it). I am not sure what the “formula code” was, but have no idea how to edit that.

    On this particular page of my website, I have a contact form, and needed to add/edit the fields & options that were available. I needed to see the actual HTML code to have any clue of what I was doing.

    One problem I am having, is that on my home page, I have a “box” for the website visitor to enter their ZIP code, and click “GO”. This ZIP code would then transfer over to my contact form page with the ZIP code portion already filled out.

    I had to modify the contact form, because I now have the form being submitted to another location (a different form action)it actually submits the users contact info directly into my Customer Relationship management system (CRM). My website is designed to capture leads…

    Does anyone have an idea of how I might modify the “ZIP code form” on my homepage, so the “ZIP code field” will transfer the actual “ZIP code” over to my contact page (Get Quotes Page on my site) pre-filled?

    My homepage is medicaresupplementsolutions.com and my “get quotes” page with the contact form is medicaresupplementsolutions.com/get-quotes

    As you can tell right now, if you enter your zip code in the home page, it does not transfer over to the “get quotes” page like it should. I don’t know how to fix this…

  • #5 / Sep 27, 2011 5:36pm

    Boyink!

    5011 posts

    Well…it could well be that some of that “formula code” you deleted was the EE functionality required to pull this off.  Do you have that code yet?

    The interaction flow kinda breaks my expectations as a user - I expect to get results after putting in a zip code vs just a prefilled form field, but that notwithstanding the only way I know to pull this off in EE would require passing the zip code through a segment variable:

    http://ellislab.com/expressionengine/user-guide/templates/globals/url_segments.html

    So you’d take the user input from the home page, pass it into the URL as a custom segment appended onto the link to the form page, then on the form page use a segment variable to pull the value from the URL into the form field as a default value.

  • #6 / Sep 27, 2011 7:16pm

    ralph.m

    225 posts

    The “template” was written in some type of formula code, something of which I did not understand. What I did was go to the live web page and copy the source code, then paste that code within the “template”, and removing what “formula” code was there in the first place.

    Depending on how the site is built, that could be a disastrous move. That special code in there is what allows ExpressionEngine to pull in dynamic content (such as anything that you enter through the Publish pages) so you will have disabled that functionality now. I hope you kept a copy of the original page code, just in case.

    Don’t go doing this on too many pages. This is why web developers normally don’t give clients access to the templates.

  • #7 / Sep 27, 2011 7:28pm

    Success99

    5 posts

    The “template” was written in some type of formula code, something of which I did not understand. What I did was go to the live web page and copy the source code, then paste that code within the “template”, and removing what “formula” code was there in the first place.

    Depending on how the site is built, that could be a disastrous move. That special code in there is what allows ExpressionEngine to pull in dynamic content (such as anything that you enter through the Publish pages) so you will have disabled that functionality now. I hope you kept a copy of the original page code, just in case.

    Don’t go doing this on too many pages. This is why web developers normally don’t give clients access to the templates.

    Haha. Yes I did keep a copy of the code from that page just in case. Actually I did keep a few of the form codes within EE some for the footer and some for the header. As for as I can tell (I tested) details from my publish page are still working.

    The reason I did this is because my web design company is getting ridiculous on wnat they want to charge me to make simple code changes, and it is easier and cheaper for me to make modifications myself.

    If you know what Salesforce.com is (a CRM), I needed to modify my contact page to submit contact information directly to Salesforce using custom fields that I created in Salesforce. Trying to simply explain this to my web designer would have cost me big time.

    I do not plan on changing any other pages like this, I just needed the ability to change this “get quotes contact form”.

    P.S. Does anyone here have good hourly rates, or know someone who does? I am looking for someone who can make basic changes for me (possible other web services in the future) without charging me an arm and a leg. I am young with a start-up company and cannot afford huge hourly rates like my current designer.

  • #8 / Sep 27, 2011 7:34pm

    ralph.m

    225 posts

    That sounds fair enough. 😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases