Creating Dream example
1. Header
This part of the website is located in header.php file.
You can see the content here: See content
Number 1 - Module Logo. We are creating this element with module "logo". The example for that how to create this element is this part of code:
As you suppose the attribute default-text will fill the default text of your module.
For more information about module "logo" here.
Number 2 - Module Menu. We are creating this element with the part of code below:
The attribute template="header" is setting about that how to display the navigation. You can use the module with different styles with the settings "Skin".
For more information about module "menu" click here.
Number 3 - Simple text. This is a simple text which can be editable.
The part of code for this element is:
You can define scope for the edit field with rel="global" and field="dream_header_phone" where field must be with prefix template_name_ and must be uniq for the page. You must also add the class edit on the scoped element.
As you see we are using the class "safe-mode" on the wrapper to prevent the breaking of structure of the element.
Number 4 - Search form. On number four you see the link which open the modal with "Search" form.
You can also use module "search". For example:
Number 5 - Link. On number five you see link which points to "Profile page".
Number 6 is link which open the sidebar with module "shop/cart".
Learn more about module "shop"
2. Layout with modules
The content of the file for the layout above is on address: see file
Number 1 - Change image. On this number you see function which allows you to change the background of the element.
The background is defined with inline styles. For example:
When you set background-image with inline style on element, microweber detects that you want to use "Change image" functionality for this element.
Number 2 - Simple text. This element is just simple text using as logo. It is in editable area, which means that you can edit it.
Number 3 - Module Button. Whith this module you can manage the settings of the buttons.
Example for how to use Module "btn" is:
Number 4 - Social icons. This is module "social_links". Example of using it:
3. Another layout
Link to content of this layout is here
Number 1 is the same like Number 1 from previous section.
Number 2 is block with cloneable columns.
As you see of each column you have "cloneable" class. This class will show you the handles for changeing the order of elements, duplicate elements and remove elements.
4. Layout with Post module
In this layout we are using the Module "post" for showing Blog posts.
[#](Learn more about module "posts" "")
5. Footer
The file is located in github.
On number 1, 3 and 5 you see modules which I explained above on the page.
Number 2 is navigation. We are showing the navigation with module "menu". The difference between navigation on header and navigation in footer is that we are using difference templates for module. More about module "menu" you can find here.
On number 4 is shown the module "newsletter".
Example for the module is:
6. Blog Sidebar
The content of blog_sidebar.php is located on this link.
As you see the sidebar is wrapped in edit field. This means that you can drag & drop everithing in the sidebar. By default we are loaded a few modules.
On number 1 is the module "search".
On number 2 is the module "categories".
In this module we are related the categories with the page ID via the attribute "content-id".
You can learn more about the module "categories" on this link.
On number 3 is the module "tags".
We are loading the module with this code.
7. Blog Post
The content of blog_inner.php is located on this link.
With this part of code, we are getting the content of current post.
Number one is the title.
We are using <?php print content_title(); ?>
to show the title.
Number two is the module "sharer". We are load the module with this code:
Number three is the module "comments". We are load the module with this code:
where with the attribute "data-content-id" we are relating the comments to this post.
8. Product inner
You can see the similar product_inner.php (liteness product_inner.php) file on this link.
Number 1 - Title
Number 2 - Price & Stock label
with those rows we are showing the Price, Stock label and the SKU number.
Number 3 - Custom fields + module "shop/cart"
Number 4 - Description
As you see we have a editable field for the description.
Number 5 - Gallery related to product
For more information about module "pictures" here.
9. Layout with Products list and Categories
The file content from the example is located here.
Number 1 is module "categories" whic is related with page.
More about this module on this link.
Numbers 2,3,4 are module "shop/products".
More about this module on this link.
10. Layout with Products list and Categories
To see the example click here.
We are loaded the module "shop/checkout".
Example:
More about this module on this link.
11. Contact form
The layout fron the example is located on this link and the module is located on this.
More about the module "contact_form" on this link.
Last updated