![]() The same after using the variables set for the editable regions -Įdit the ids in the admin section and the changes should get reflected in the generated page. The original HTML code for the profiles section is. Since we have defined these editable regions in the template tag, for their contents to appear on the web page we need to use the variables representing them at the required places. Refresh and then visit the admin section. Note how we have grouped the five text type editable regions by creating an editable region of type group and linking the other regions to it. Make the following changes to the template tag at the top. ![]() If we place the definition of the editable regions within conditional tags, the condition where an editable region will not be output will also cause the region to be deleted. The reason for this is that, as you'll soon see, we'll be outputting these social links conditionally (i.e. ![]() Refreshing by revisiting it as super-admin will yield the following results for the changes made so far -Įditing any of these regions and saving the changes will cause the modifications to appear on the page immediately.Īs for the Social Profiles section, instead of defining its editable regions by enclosing the actual elements with the editable tags in-situ (the way we did for the previous sections), we'll define them within the template tag (the way we did in blog and portfolio sections) and use variables to display them. Let us define the editable regions for the introductory paragraph and the address and email in the sidebar by directly enclosing these parts by Couch editable tags. We can, if needed, create an editable region each for the Address, Email and Social Profiles sections or create one single region for the entire sidebar.įor the purpose of this tutorial, we'll create one editable region that will span both the Address as well as the Email section and will sub-divide the Social Profiles section into one editable region for each social site. The sidebar too can be turned into an editable region - we only need to decide how granular the division needs to be. The introductory top paragraph can be easily made into an editable region. Of these three, the contact form will be handled by the Couch form and input tags. ![]() Defining editable regionsĪs can be seen, there are three distinct parts to this template - An introductory paragraph at the top, the contact form and a sidebar containing several contact details. Let us begin by attaching Couch to this template.Ĭhange the extension of contact.html to make it contact.phpĪdd the two lines of boilerplate PHP code to enclose the contents of this file and use the template tag to change the display-name of the template.Īccess while logged on as the super-admin. The contact.html that comes with Aurelius provides a contact form as well as some contact details. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |