Creating Dream example

1. Header

menu.jpg The first example about how exactly dream (default) template was made is the 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:

<module type="logo" id="logo" template="default" default-text="Dream"/>

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:

<module type="menu" name="header_menu" class="nav-module menu-module left" template="header"/>

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:

<div class="nav-module right hidden-xs hidden-sm hidden-md safe-mode">
    <span class="nav-function phone-header edit safe-element" rel="global" field="dream_header_phone" style="">
        <?php _lang("Call us", "templates/dream"); ?>: +1 555 666
    </span>
</div>

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

header.jpg

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:

Learn more about module "btn"

Number 4 - Social icons. This is module "social_links". Example of using it:

3. Another layout

icon_layouts.jpg

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

post_list.jpg

In this layout we are using the Module "post" for showing Blog posts.

[#](Learn more about module "posts" "")

footer.jpg

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

sidebar.jpg

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

product_inner.jpg

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.

product_inner_1.jpg

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

product_list.jpg

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

checkout.jpg

To see the example click here.

We are loaded the module "shop/checkout".

Example:

More about this module on this link.

11. Contact form

forms.jpg

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

Was this helpful?