Отображать динамические блоки вместо статических на главной странице?

У меня есть сайт, главная страница которого содержит 4 блока текста, в основном небольшие вводные блоки. В настоящее время эти ящики содержат статические данные. Теперь я хочу преобразовать эти поля в содержимое и изменить их поля от администратора. В основном сделать сайт более удобным для пользователей. Ящики содержат заголовок, небольшую миниатюру и небольшое описание. Я создал тип контента, в котором у меня есть поле заголовка, поле тела и 1 вариант прикрепленного изображения. Могу ли я показать их так, как хочу, не используя представления.

                        <?php if($messages) print $messages; ?>
                        <div class="content_left">
                        <div class="block1">
                            <h4 class="title-storefront">Gorgeous Storefront</h4>
                                Each Shopify store comes with a variety of beautiful themes to choose from.Each Shopify store comes with a variety of beautiful themes to choose from.Each Shopify store comes with a variety of beautiful themes to choose from.Each Shopify store comes with a variety of beautiful themes to choose from.Each Shopify store comes with a variety of beautiful themes to choose from.</div>
                            <div class="block1">
                            <h4 class="title-customizable">100% Customizable</h4>
                                Use your own HTML &amp; CSS and have complete control over the look and feel of your online store.Use your own HTML &amp; CSS and have complete control over the look and feel of your online store.Use your own HTML &amp; CSS and have complete control over the look and feel of your online store.Use your own HTML &amp; CSS and have complete control over the look and feel of your online store.
                        </div>
                        </div>
                        <div class="content_right">
                            <div class="block1">
                            <h4 class="title-shoppingcart">Shopping Cart</h4>
                                Your online store will have its own shopping cart and streamlined checkout.Your online store will have its own shopping cart and streamlined checkout.Your online store will have its own shopping cart and streamlined checkout.Your online store will have its own shopping cart and streamlined checkout.Your online store will have its own shopping cart and streamlined checkout.
                        </div>
                            <div class="block1">
                            <h4 class="title-secure">Super Secure</h4>
                                 We have a dedicated team of security experts that make sure your e-commerce site is as secure as possible.We have a dedicated team of security experts that make sure your e-commerce site is as secure as possible.We have a dedicated team of security experts that make sure your e-commerce site is as secure as possible.We have a dedicated team of security experts that make sure your e-commerce site is as secure as possible.
                        </div>
                        </div>
                      </div> <!-- /#content-area -->

How can I print title, image and description of a content separately.


person samir chauhan    schedule 14.03.2011    source источник


Ответы (1)


По сути, создавайте блоки для контента. Возможно, вам потребуется добавить регионы в вашу тему, которым вы затем сможете назначать свои блоки. Однако, если вы хотите добавить списки узлов в блоки, представления — это то, что вам нужно. Если вы сможете объяснить, почему вы избегаете просмотров, возможно, другие смогут посоветовать альтернативу.

person yitznewton    schedule 14.03.2011