[Solved] Using {content_dump} plugin, showing 5 while limit set to 4.

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
Lucaz
Forum Members
Forum Members
Posts: 66
Joined: Fri Dec 01, 2006 9:56 pm
Location: Netherlands

[Solved] Using {content_dump} plugin, showing 5 while limit set to 4.

Post by Lucaz »

I'm using the {content_dump} plugin to show a portfolio
http://wiki.cmsmadesimple.org/index.php ... ntent_dump

This way you can have one content page and export that content to the homepage (like we want to show your 4 latest or best projects) and show and archive of all your projects on www.domain.com/projects/

Anyway, when i say limit="3" in the code, it show's me 3 pages on the homepage. When I say 4, it shows me 5.. When I say 5 it shows me 7...

{content_dump exclude="75" limit_count="5" extensions="image1,client,sub_title,content_home"}  
{foreach from=$dump item=dump}  


 
   content->alias}' " onmouseover="this.style.background ='#f4f4f4'; this.style.cursor = 'pointer'">



content->alias}">content->alias}.jpg" alt="alias" class="casePhoto border" />


content->alias}">{$dump->content->title}
{$dump->extensions->sub_title->data}
{$dump->extensions->content_home->data} content->alias}">Lees Meer
Klant: {$dump->extensions->client->data}



     
             [iconen]
     






 

{/foreach}  


UPDATE 090625
So it seems you can show a folder, the limit tag is for limiting the folders it seems. So if I would have a total of:

1: domain.com/about
2: domain.com/projects
3: domain.com/contat
4: domain.com/shop
5: domain.com/people
6: domain.com/whatever

And say, start=2 limit=2

It seems to only show
2: domain.com/projects
3: domain.com/contat

... but that is not what I want.. I want to limit whitin the folder..
2: domain.com/projects
Limit on the pages inside the folder..
Last edited by Anonymous on Mon Jun 29, 2009 4:26 pm, edited 1 time in total.
nhaack

Re: Using {content_dump} plugin, showing 5 while limit set to 4.

Post by nhaack »

Hi Lucaz,

I'm currently on a trip but will be back Friday night. I will try to give you feedback as soon as possible.

Just a brief one:

The Limit parameters are for limiting the output to a single amount. They do not regard the sites hierarchy at all. You might want to check the parameter "start_id" which allows you to determine the initial starting position of content_dump.

So let content_dump begin with the page you are looking at, cou can use

{content_dump start_id=$content_id}

If you do not want your starting page to appear, use it like:

{content_dump start_id=$content_id exclude=$content_id}

So, pick the ID of the folder you want to limit content_dump to as the start_id Parameter and you shoudl be fine. The parameter "depth" is usefull if you only want to get specific hierarchical levels within the selection made with the other parameters.

Hope that helps for time being.

Best
Nils
User avatar
Lucaz
Forum Members
Forum Members
Posts: 66
Joined: Fri Dec 01, 2006 9:56 pm
Location: Netherlands

Re: Using {content_dump} plugin, showing 5 while limit set to 4.

Post by Lucaz »

Dear Nils,

Thank you for your answer.

Yesterday it was possible to show a list of project on the homepage who I could grab from www.domain.com/projects/
But still, When I say
limit_count="1" it shows 1 project on the homepage
limit_count="2" it shows 3 projects on the homepage
limit_count="3" it shows 3 projects on the homepage
limit_count="4" it shows 5 projects on the homepage
limit_count="5" it shows 7 projects on the homepage

Have a nice friday.

Cheers,
Lucas
nhaack

Re: Using {content_dump} plugin, showing 5 while limit set to 4.

Post by nhaack »

Hi Lucas,

can you provide me with some additional information?

--> What DB do you use? It came to my attention that people have problems when using Postgres and Content_Dump.
--> Shall you be using mysql, can you provide me with your MySQL version?
--> Do you use Version 0.8 of content_dump?
--> Additionally, which CMS Version do you use (I didn't had the chance to verify correct function for 1.6 yet)?
--> Even better, can you post the output of the system information in CMSMS?

The limit_start and limit_end parameters are actually directly applied to the mysql statement as "LIMIT %limit_start, %limit_count". So I do not really get why you are provided with the wrong amount of returned items. Your template looks fine and doesn't contain any errors on first sight.

--> Can you post the current call you put into your template for content_dump?

Probably the problem is so obvious I do not see it,

--> would you be able to post your sites structure (you could blind out the names)?
--> Alternatively, can you provide me with an URL (e.g. per PM or eMail)?

What you can also do is the following: Edit the plugin-file, goto line 687 (current version) and insert

Code: Select all


echo $sql_the_full_query;

Then run the plug-in by calling the page it is used on. You will now see the mysql statement ultimately used to generate the dump.

--> Can you PM me this.  It might provide a clue as to where I can look for the problem.

I hope to be able to solve this problem. The --> are just used to indicate the questions :)

I wish you a pleasant weekend
Nils
User avatar
Lucaz
Forum Members
Forum Members
Posts: 66
Joined: Fri Dec 01, 2006 9:56 pm
Location: Netherlands

Re: Using {content_dump} plugin, showing 5 while limit set to 4.

Post by Lucaz »

Dear Nils,

I did not believe my eyes the next morning I came at work and saw it was working.. It might be because of a conflict with an other module, or the cache. Don't know..

Anway I still want to send you all information I have:

--> What DB do you use? It came to my attention that people have problems when using Postgres and Content_Dump.
--> Shall you be using mysql, can you provide me with your MySQL version?
MySql 2.6.4-pl1-Debian-1ubuntu1.1

--> Do you use Version 0.8 of content_dump?
Version info: 0.8
This plug-in version was created: Feb 2009

--> Additionally, which CMS Version do you use (I didn't had the chance to verify correct function for 1.6 yet)?
1.5.3 "Arecibo"

--> Even better, can you post the output of the system information in CMSMS?
No, I can't it on our local development server, I might try at home.

--> Can you post the current call you put into your template for content_dump?

{content_dump depth="-1,1" extensions="image1,client,sub_title,content_home" limit_count="4" start_id="75" exclude="75"} 

{foreach from=$dump item=dump}
{/foreach} 

--> would you be able to post your sites structure (you could blind out the names)?
--> Alternatively, can you provide me with an URL (e.g. per PM or eMail)?
--> Can you PM me this.  It might provide a clue as to where I can look for the problem.


So again, I will try to import the sql file on my staging server and PM you that URL and login so you can check it out.

For now thank you very much.
Post Reply

Return to “Modules/Add-Ons”