Jump to content
Announcing Achievements! ×

Community

PAGES - Confused by IPB & the staff


xert77

Recommended Posts

  • Replies 88
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Hi, Before I complain, I want to start off with a nice note. Since joining IPB my users have loved the website, commented on how nice it works compared to VB & I have loved your support. When eve

Thank you for taking the time to share your feedback. Pre-made templates are something we'd like to do. We'd also like to release our own work we've done here for examples to use.  You may find the i

Please, please, please, please re-add the ability to export templates without a database. Lack of premade MP templates for the articles database, including feed block templates, is directly related to

Posted Images

 

I know the saying - "when its ready" - anyway - could you give a closer estimate on the timeframe for the documentation? This month?

 

 

IPB4 is changing constantly, hard to make documentation for a not fully  ready product.

When it will be ready then they can work on the documentation.

 

Link to comment
Share on other sites

Just an question -

I am still getting a red </section> at the bottom with this code

<section class='ipsType_normal ipsSpacer_both'>
	{{if count($articles)}}
  <div class='ipsGrid ipsGrid_collapsePhone'>
		{{foreach $articles as $id => $record}}
    {{if ($id == 0)}} <div class='ipsGrid_span12'>
    {{else}}<div class='ipsGrid_span6'>
    {{endif}}
			{template="entry" app="cms" location="database" group="article_grid" params="$record, $database"}
    </div>
		{{endforeach}}
    </div>
	{{endif}}
</section>

Any idea why?

Link to comment
Share on other sites

Just an question -

I am still getting a red </section> at the bottom with this code

<section class='ipsType_normal ipsSpacer_both'>
	{{if count($articles)}}
  <div class='ipsGrid ipsGrid_collapsePhone'>
		{{foreach $articles as $id => $record}}
    {{if ($id == 0)}} <div class='ipsGrid_span12'>
    {{else}}<div class='ipsGrid_span6'>
    {{endif}}
			{template="entry" app="cms" location="database" group="article_grid" params="$record, $database"}
    </div>
		{{endforeach}}
    </div>
	{{endif}}
</section>

Any idea why?

The code is technically correct, but the system probably doesn’t understand that there are two DIVs in the IF/ELSE clause, which will only output one.

It could be optimized by using just one DIV there and the IF/ELSE clause only for the class. 

 

Link to comment
Share on other sites

The code is technically correct, but the system probably doesn’t understand that there are two DIVs in the IF/ELSE clause, which will only output one.

It could be optimized by using just one DIV there and the IF/ELSE clause only for the class. 

 

So how would you suggest I change it?

also

http://i.imgur.com/99fv72E.png?1 

on the picture - the bottom left box is indented for no reason.

Link to comment
Share on other sites

How easy is it to change the grid layout to 3 x 3?

You mean with the code discussed here in the last posts? Very easy. 

The grid system is based on 12 units, therefore the “ipsGrid_span12” for a full-width entry. For the 2x2 the example uses two times half that value: 6. 
If you want 3 entries per line, you just use 12 divided by 3, which is 4. So replace the ipsGrid_span6 with ipsGrid_span4 and you got 3 entries per line. 

Link to comment
Share on other sites

You mean with the code discussed here in the last posts? Very easy. 

The grid system is based on 12 units, therefore the “ipsGrid_span12” for a full-width entry. For the 2x2 the example uses two times half that value: 6. 
If you want 3 entries per line, you just use 12 divided by 3, which is 4. So replace the ipsGrid_span6 with ipsGrid_span4 and you got 3 entries per line. 

Champion, thanks Ralph.

Link to comment
Share on other sites

I have a bit of an issue with the above information for grid view. 

Essentially all I have done is remove/paste what is above and change the ipsGrid_span6 to ipsGrid_span4. It works but I have layout issues.

  • Firstly I need to truncate the title, how do we do this? I know it's related to here, but unsure how to?
  • 	<h1 class='ipsType_pageTitle'>{$database->_title}</h1>
    	{{if $database->_description}}
    		<div class='ipsPageHeader_info ipsType_light'>
    			{$database->_description}
    		</div>
    	{{endif}}
    
  • Secondly the grid is all over the shop (was OK at 6 videos) then added a couple more and the last video added has caused issues due to title size I believe.
  • "Show All Categories" when selected show's a white page, however, click on the category with the video and the list appears.

https://i.gyazo.com/2bab51b0ab52dd78ee6150e582f61a96.png

Copy of my template index.

<div class='ipsPageHeader ipsClearfix ipsSpacer_bottom'>
	{{if $database->use_categories}}
	<div class='ipsPos_right ipsResponsive_noFloat'>
		<a href="{$url->setQueryString('show', 'categories')}" class="ipsButton ipsButton_medium ipsButton_fullWidth ipsButton_link"><i class="fa fa-folder-open"></i> {lang="cms_show_categories"}</a>
	</div>
	{{endif}}
	<h1 class='ipsType_pageTitle'>{$database->_title}</h1>
	{{if $database->_description}}
		<div class='ipsPageHeader_info ipsType_light'>
			{$database->_description}
		</div>
	{{endif}}
</div>

{{if $database->can('add') or \IPS\Member::loggedIn()->member_id}}
	<ul class="ipsToolList ipsToolList_horizontal ipsClearfix ipsSpacer_both ipsResponsive_hidePhone">
		{{if $database->can('add')}}
			<li class='ipsToolList_primaryAction'>
				<a class="ipsButton ipsButton_medium ipsButton_important ipsButton_fullWidth" {{if $database->use_categories}}data-ipsDialog="1" data-ipsDialog-size="narrow" data-ipsDialog-title="{lang="cms_select_category"}"{{endif}} href="{$url->setQueryString( array( 'do' => 'form', 'd' => \IPS\cms\Databases\Dispatcher::i()->databaseId ) )}">{lang="cms_add_new_record_button" sprintf="$database->recordWord( 1 )"}</a>
			</li>
		{{endif}}
	</ul>
{{endif}}

<hr class='ipsHr'>
<section class='ipsType_normal ipsSpacer_both'>
{{if count($articles)}}
    <div class='ipsGrid ipsGrid_collapsePhone'>
		{{foreach $articles as $id => $record}}
            <div class='ipsGrid_span4'>
			{template="entry" app="cms" location="database" group="Videos" params="$record, $database"}
            </div>	
    {{endforeach}}
    </div>
  {{endif}}
</section>
{{if $database->featured_settings['pagination'] and ( $pagination['pages'] > 1 )}}
	{template="pagination" app="core" location="global" group="global" params="$url, $pagination['pages'], $pagination['page'], $database->featured_settings['perpage'], TRUE, 'page'"}
{{endif}}

Any help would be appreciated.

Edited by craigf136
Link to comment
Share on other sites

For some reason, after the main article that appears at the top I seem to get an indent on the others...any idea why?

99fv72E.png?1

@Ralf Herrmann - Have you got any idea on this?

I don't know how GridLayout should work, but here the reason of this :

The first ipsGrid_span6 after the ipsGrid_span12 has this style :

html[dir="ltr"] .ipsGrid_span12:nth-child( 1n ), html[dir="ltr"] .ipsGrid_span12 + [class*="ipsGrid_span"], html[dir="ltr"] .ipsGrid_span6:nth-child( odd ), html[dir="ltr"] .ipsGrid_span4:nth-child( 3n+1 ), html[dir="ltr"] .ipsGrid_span3:nth-child( 4n+1 ), html[dir="ltr"] .ipsGrid_span2:nth-child( 6n+1 ), html[dir="ltr"] .ipsGrid_span1:nth-child( 12n+1 ) {
    margin-left: 0;
}

and the others have this :

html[dir="ltr"] .ipsGrid > [class*="ipsGrid_span"] {
    float: left;
    margin-left: 2.127659574468085%;
}

 

Link to comment
Share on other sites

And regarding the grid view for article listings: while that is not a default option, it only needs a small template change, since a responsive grid is already in the CSS. 

So to have a grid view for articles:

1. Add a custom database template in the Pages’ template manager. Make sure it’s of the type “Featured Records”. Also make sure you assign it to your article database. Also call it “Article Grid” (that name is later used in the code). 

Bildschirmfoto_2015-07-11_um_17.47.19.th

2. Open the “index” template of this newly created template group. 

Replace this part:

{{if count($articles)}}
		{{foreach $articles as $id => $record}}
			{template="entry" app="cms" location="database" group="article_grid" params="$record, $database"}
    {{endforeach}}
{{endif}}

With this:

{{if count($articles)}}
    <div class='ipsGrid ipsGrid_collapsePhone'>
		{{foreach $articles as $id => $record}}
            <div class='ipsGrid_span6'>
			{template="entry" app="cms" location="database" group="article_grid" params="$record, $database"}
            </div>	
    {{endforeach}}
    </div>
  {{endif}}

That’s it. Your articles are now displayed as a grid which automatically collapses on smaller screen. 

And a bonus for all those who want the 2x1x1 layout from 3.4 – use this instead:

{{if count($articles)}}
    <div class='ipsGrid ipsGrid_collapsePhone'>
		{{foreach $articles as $id => $record}}
            {{if ($id == 0)}} <div class='ipsGrid_span12'>
            {{else}}<div class='ipsGrid_span6'>
            {{endif}}
			{template="entry" app="cms" location="database" group="article_grid" params="$record, $database"}
            </div>	
        {{endforeach}}
    </div>
{{endif}}

Bildschirmfoto_2015-07-11_um_18.06.34.th

 

This is a good example of why I'd like to be able to highlight/mark posts, not just follow topics! Like marking as "Favorite."

For now, I will just quote it for later, thanks.

Edited by chilihead
Link to comment
Share on other sites

For some reason, after the main article that appears at the top I seem to get an indent on the others...any idea why?

99fv72E.png?1

@Ralf Herrmann - Have you got any idea on this?

You are not alone :)

https://community.invisionpower.com/topic/417791-pages-confused-by-ipb-the-staff/?do=findComment&comment=2566236b

Nice work, this is already looking amazing! Hope you get the indent sorted, I think someone above had a similar issue (might be wrong though)

It was me and I was not able to get any answer ..

Link to comment
Share on other sites

  • 3 weeks later...
  • Recently Browsing   0 members

    No registered users viewing this page.


×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy