i move breadcrumbs, but now i need that Title Page show below, actually html show
<div class="breadcrumbs"></div>
<div class="col-main">
<div class="my-account">
<div class="page-title"></div>
</div>
</div>
I need
<div class="breadcrumbs"></div>
<div class="page-title"></div>
<div class="col-main">
<div class="my-account"></div>
</div>
How can i do this, i suposse is necessary modify xml file but i not find the solution.
Thanks
Well, I choose create new custom block in page.xml
<block type="core/template" name="my_top_title" as="my_top_title" template="page/html/toptitle.phtml"/>
In 2columns-left.phtml,
<?php echo $this->getChildHtml('my_top_title') ?>
In toptitle.phtml
<?php $title=$this->getLayout()->getBlock('head')->getTitle(); ?>
<div class="my-title">
<h1><?php echo $title ?></h1>
</div>
Works fine.
Related
I need to show 4 flexible items and load more, I don't know how to make it manually, so I tried that plugin But I can't understand how to make the shortcode correctly
That's what I generated
[ajax_load_more container_type="div" acf="true" acf_field_type="flexible" acf_field_name="review-repeater" post_type="any" meta_key="review-repeater" meta_value="" meta_compare="IN"]
The original flexible content loop without loadmore
<div class="row justify-content-center">
<?php if( have_rows('review-repeater') ):
// Loop through rows.
while ( have_rows('review-repeater') ) : the_row();?>
<div class="rev">
<?php // Case: Paragraph layout.
if( get_row_layout() == 'review-repeater' ):?>
<div class="d-flex justify-content-between">
<div class="rev-left">
<div class="raiting-review"><?php echo get_sub_field('review-raiting'); ?></div>
<div class="review-content">
<p><?php echo get_sub_field('review-content'); ?></p>
<div class="d-flex">
<?php echo get_sub_field('review-author'); ?> , <?php echo get_sub_field('review-date'); ?>
</div>
</div>
</div>
<div class="rev-right">
<img src="<?php echo get_sub_field('review-platform') ?>">
<p><?php echo get_sub_field('review-count'); ?></p>
</div>
</div>
</div>
<?php endif;
// End loop.
endwhile;
endif; ?>
I copied that code to the 'repeater template' instead of default post archive loop, but the shortcode doesn't show my content, maybe someone already used the same decision?
Already tried posts_per_page="4" parameter, it didn't help too.
I'm using Twitter bootstrap 3 and CodeIgniter. In my website I have a list of posts on the left and a sidebar column of the right. In this sidebar I have a search box with input field and a dropdown, another box with a list of 10 popular posts, and another box with a list of categories.
I would like to move only the search box of the sidebar to the top of the site in smaller screen devices. Because it's a search box I would like it to show first and then the posts in mobile view.
I am having trouble doing this. I've managed to reorder the columns, but it's not the result is that the entire column shows first, and I want the search box on top.
Any suggestions?
pull-left and pull-right did not work for me, or I was unable to make it work. Would using classes with hidden and show values be a better approach?
This is my template for post view
<div class="container">
<div class="row">
<div class="col-sm-8">
<div id="content" class="content-page">
<h2><?php echo $title; ?></h2>
<?php echo $content; ?>
</div> <!-- // content -->
</div><!-- // col-sm-8 -->
<div class="col-lg-4">
<?php $this->load->view('templates/posts_sidebar');?>
</div><!-- // col-lg-4 -->
</div><!-- // row -->
<hr>
</div><!-- // container -->
Sidebar search view is:
<div class="well post_search">
<?php $attributes = array('id' => 'search', 'role' => 'form', 'autocomplete' => 'off'); ?>
<?php echo form_open('posts/filter', $attributes); ?>
<div class="form-group">
<h4><label for="title"><i class="fa fa-search"></i> <?php echo $text_posts_sidebar_search; ?></label></h4>
<div class="input-group">
<?php echo form_input('title', set_value('title', $this->input->get('title')), 'class="form-control" id="title" placeholder="'.$text_posts_sidebar_search_placeholder.'"'); ?>
<span class="input-group-btn">
<?php echo bt_submit('', '<span class="fa fa-search"></span>', 'btn btn-default'); ?>
</span>
</div>
</div>
<div class="form-group">
<label for="parent_id"><i class="fa fa-folder-open-o"></i> <?php echo $text_posts_sidebar_search_in; ?></label>
<?php echo form_dropdown('parent_id', $dropdown_postcategories, $this->input->get('parent_id') ? $this->input->get('parent_id') : '', 'id="parent_id" class="form-control"'); ?>
</div>
<!-- // input-group -->
<?php echo form_close(); ?>
</div><!-- /well -->
Okay, I sorted my issue.
Just in case this is helpfull for someone else.
In my template I actually have two search forms now.
One visible and one hidden.
Depending on screen resolution, using media querys I show or hide what I need.
My products in Magento have attribute Brand. What I need to do is to display a list of Brands in the footer.Something like: Our Brands: Brand 1, Brand 2, Brand 3...
As far as I understand I need somehow retrieve values from Advanced search and display them in footer as a list, but I don't know how to do it. Does anybody have solution for this?
There are several steps to follow
here i am giving detail instruction how to add your custom attribute at footer.
1. you have to create on block to get all your brand product with assign your custom attribute
for block.
$attributes = Mage::getSingleton('eav/config')
->getEntityType(Mage_Catalog_Model_Product::ENTITY) // pass your attribute id
->getAttributeCollection()
->addSetInfo();
foreach ($attributes as $attribute)
{
if ($attribute->usesSource())
{
echo "{$attribute->getFrontendLabel()}:\n";
foreach ($attribute->getSource()->getAllOptions() as $option)
{
echo " {$option['label']}\n";
}
echo "\n";
}
}
above is print logic you should have to store it one array in return with one variable.
2. create view file in your theme for display purpose and call that block function in that home_logo file.
<?php $_brandsCollection = $this->getBrandsLogoCollection();?>
<div class="block block-layered-nav">
<div class="block-title">
<strong><span><?php echo $this->__('Brands') ?></span></strong>
</div>
<div class="block-content" >
<div id="Carousel2" class="carousel">
<div class="button navButton previous" style="display:none;">Back</div>
<div class="button navButton next" style="display:none;">More</div>
<div class="container">
<div class="items">
<?php foreach ($_brandsCollection as $_brand): ?>
<div class="item">
<div class="key caption"></div>
<div class="icon">
<img class="brand-base-logo" alt="<?php echo $_brand->getBrandLogo() ?>" src="<?php echo $_brand->getBrandLogo(); ?>" width="50" height="50">
</div>
<div class="picture">
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
</div> <!-- end block content-->
</div>
3. Assign that file to footer using your_layout.xml with reference before footer.
<reference name="footer">
<block type="brand/left" name="brands_logolist" before="-" template="brand/home_logo.phtml" />
</reference>
Hope you can understand my logic.
I'm used to using Joomla 1.5, and am trying to switch to 2.5.
I have 2 modules in the right position, I expect that there would be 2 boxes (which is what I want), one box for each module. But for some reason it's just adding the second module to the first box.
It's not copying the divs (main_top_box, main_mid_box, main_bottom_box) inside the if statement: <?php if($this->countModules('right')) { ?>, instead it's just putting the <jdoc:include type="modules" name="right"/> commands side by side.
You were able to do this with the code I've used in Joomla 1.5. Have they removed this functionality?
Here's what I see:
Here's what I should see:
Joomla Code:
<?php if($this->countModules('right')) { ?>
<div class="main_top_box">
<div class="main_mid_box">
<div class="main_bottom_box">
<jdoc:include type="modules" name="right"/>
</div>
</div>
</div>
<?php } ?>
Code Output(Source):
<div class="main_top_box">
<div class="main_mid_box">
<div class="main_bottom_box">
<div class="custom" >
<h3>Services</h3>
<ul>
<li>Family Law</li>
<li>Collaborative Law</li>
<li>Real Estate</li>
<li>Wills</li>
<li>Estate Planning</li>
<li>Estates</li>
</ul>
<p> </p>
</div>
<div class="custom" >
<h3>Test</h3>
<p>Testing the Right Box</p>
</div>
</div>
</div>
</div>
Should Be(Source):
<div class="main_top_box">
<div class="main_mid_box">
<div class="main_bottom_box">
<h3>Services</h3>
<ul>
<li>Family Law</li>
<li>Collaborative Law</li>
<li>Real Estate</li>
<li>Wills</li>
<li>Estate Planning</li>
<li>Estates</li>
</ul>
</div>
</div>
</div>
<div class="main_top_box">
<div class="main_mid_box">
<div class="main_bottom_box">
<h3>Test</h3>
<p>Testing the Right Box</p>
</div>
</div>
</div>
You can do this by these to methods
Either Change the order of display the module in the same position in the module manager.
Create separate module position for both the modules and assign them accordingly.
I want add my custom sidebar next right column all page.
Please check this link: http://www.wildbuilder.com/images/Untitled-1-Recovered.png
(I explain using image)
There are featured products in the mini sidebar.
I don't want include the mini sidebar into right column. next to right column :)
I already made featured-products.phtml at /catalog/product/ folder.
And I created cms block, featured_products and I put in this code
{{block type="catalog/product_list" category_id="4" template="catalog/product/featured-products.phtml"}}
And I added code at page.xml like this.
<block type="core/text_list" name="content" as="content" translate="label">
<label>Main Content Area</label>
<block type="cms/block" name="featured_products">
<action method="setBlockId"><block_id>featured_products</block_id></action>
</block>
</block>
Then I added code in 2columns-right.phtml at /template/page/ folde.
like this,
<div class="wrapper">
<?php echo $this->getChildHtml('global_notices') ?>
<div class="page">
<?php echo $this->getChildHtml('header') ?>
<div class="main-container col2-right-layout">
<?php echo $this->getChildHtml('breadcrumbs') ?>
<div class="main">
<div class="col-main">
<?php echo $this->getChildHtml('global_messages') ?>
<?php echo $this->getChildHtml('content') ?>
</div>
<div class="col-right sidebar"><?php echo $this->getChildHtml('right') ?></div>
</div>
</div>
<?php echo $this->getChildHtml('before_body_end') ?>
</div>
<?php //my slidebar ?>
<div style="float:right;width:92px;vertical-align:top;background-color:#000;margin:-766px 110px 0 0;">
<?php echo $this->getChildHtml('featured_products') ?>
</div>
</div>
But my sidebar is not showing.
What can I do?
Please let me know.
Thank you.
Chilipepper explain how you can use a category in sidebar.
How to list all the products in a single category in a sidebar block