CTL Module Maker creates blank modules?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Brandt
Forum Members
Forum Members
Posts: 55
Joined: Fri Mar 05, 2010 10:04 am

Re: CTL Module Maker creates blank modules?

Post by Brandt »

Thank you Klenkes for your reply!

I changed the sentences, though it still doensn't work.

Where can I see what I have to put where you now read 'foto_input'

{if $oneval == 'foto_input'}

Could you in a very easy way explain me, a regular guy, what it is I have to do, in order to make this module work.

PHP and these template files is pretty new for me...

Thank you for your time!
klenkes
Power Poster
Power Poster
Posts: 307
Joined: Mon Sep 08, 2008 9:43 am

Re: CTL Module Maker creates blank modules?

Post by klenkes »

Okay.
Edit one of your module templates.
Click on the tab Template Variables.
Click on: Smarty variables for the detail template

Now you should see all the available variables in the form of: $item->variable,
where variable is the value you need.

What is the value for your foto field? Is it foto_input? Does it read $item->foto_input(file object)?

You can always post a DNA-file and I take a look at it.

Bernd
Brandt
Forum Members
Forum Members
Posts: 55
Joined: Fri Mar 05, 2010 10:04 am

Re: CTL Module Maker creates blank modules?

Post by Brandt »

Again Bernd thank you for your quick reply!

Here is an DNA http://www.fortorange.eu/modules/fortor ... export.dna

$item->foto (file object)

So this is what I made, but it still isn't working:


{cycle values="row2,row1" assign=rowclass reset=true}
{foreach from=$itemlist item=oneitem}
{cycle values="row2,row1" assign=rowclass}

{foreach from=$adminshow item=column}
{assign var=oneval value=$column[1]}

 {if $oneval == 'foto'}
 {if $oneitem->$oneval != ""}$oneval->thumbnail}" />{/if}
 {else}
 {$oneitem->$oneval}
{/if}
{/foreach}

{/foreach}
Last edited by Brandt on Tue Mar 09, 2010 12:18 pm, edited 1 time in total.
klenkes
Power Poster
Power Poster
Posts: 307
Joined: Mon Sep 08, 2008 9:43 am

Re: CTL Module Maker creates blank modules?

Post by klenkes »

I prepared a adminpanel.tpl for you.

During module creation I noticed that you use the sharechildren option.
Be aware that some things don't work as expected anymore. Cycling through certain levels for example. I never had any luck with it. But here you go...

Bernd
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

Brandt
Forum Members
Forum Members
Posts: 55
Joined: Fri Mar 05, 2010 10:04 am

Re: CTL Module Maker creates blank modules?

Post by Brandt »

Thank you very very much for your time and template!

But for some reason it still doesn't work.

I replaced the template and it didn't work, I changed the sharechildren option and still no luck.

So now I have a question for you, because you have the DNA file:

Did you try out the module while adding a photo?

I could realy use your help on this, because I need to finish it asap.

I use:
CMSMS 1.6.7
CTLModulemaker 1.8.9.2
Anti stress pills
klenkes
Power Poster
Power Poster
Posts: 307
Joined: Mon Sep 08, 2008 9:43 am

Re: CTL Module Maker creates blank modules?

Post by klenkes »

I imported your DNA file and changed nothing. Created the module and added categories and items.

As you can see in the attached screenshot, I added more than one photo and everything worked perfectly! The screenshot is a combo of Categorie and Product but the Subcategorie is the same and works. I even used HTML in the long_text field.(Red Bold)
I even used all the available variables in the adminpanel like filename, extension, url and even filesize all together. All fine.

The only difference: I used CTLmodulemaker 1.8.9.3
But I don't remember what changed from 1.8.9.2 to 1.8.9.3
God only knows ... and Pierre-Luc (plger)

mhh... but what now?

To be on the safe side:
1. Upgrade CTLMM to 1.8.9.3
2. In adminpanel.tpl replace the line:

Code: Select all

{if $oneitem->$oneval != ""}<img src="/uploads{$oneitem->$oneval->thumbnail}" />{/if}
with:
{if $oneitem->$oneval != ""}Not an image{/if}
If your admin shows the Text: Not an image we at least know that the if==foto works.
If it still doesn't work... I don't know...

Does it work without a photo uploaded?
Attachments
screenshotcombo-FortOC.png
Brandt
Forum Members
Forum Members
Posts: 55
Joined: Fri Mar 05, 2010 10:04 am

Re: CTL Module Maker creates blank modules?

Post by Brandt »

I tried and didn't succeed.

I updated the module.

If I don't add an image it works...

See the screendump:
Attachments
screen.jpg
Last edited by Brandt on Tue Mar 09, 2010 4:11 pm, edited 1 time in total.
klenkes
Power Poster
Power Poster
Posts: 307
Joined: Mon Sep 08, 2008 9:43 am

Re: CTL Module Maker creates blank modules?

Post by klenkes »

Damned! I still don't get it.

I experimented a little bit and even $oneitem->$oneval->image works fine and generates the complete IMG tag with the big image in the admin.
And you didn't even see the Not an image when you tried?
Was it still a blank adminpage?

I am running out of ideas...
Last edited by klenkes on Thu Mar 11, 2010 8:27 pm, edited 1 time in total.
Brandt
Forum Members
Forum Members
Posts: 55
Joined: Fri Mar 05, 2010 10:04 am

Re: CTL Module Maker creates blank modules?

Post by Brandt »

IT WORKS!

Thank you so much, king of modules, Bernd!

I haven't got a clue what it is what could have been wrong...
I did overwrite the templates.

Unbelievable, thank you so much for your work!

I would like to buy you some beers.

Great!

Brandt
Brandt
Forum Members
Forum Members
Posts: 55
Joined: Fri Mar 05, 2010 10:04 am

Re: CTL Module Maker creates blank modules?

Post by Brandt »

I wanted to change something on the module by using the DNA file I received from you Bernd, overwrite the .tpl file, but ran into the same problem, somewhere there is a problem which I don't have a clue of.

What I wanted to know if the following is possible:

I have these three levels as a hierachy:

Categorie
 - Subcategorie
   -- Products

I want to have a module which gives me the following on my website:

A page showing several categories you can choose from.

If you click one you get a list of products AND subcategories.

- If you click on a product you get more info.
- If you click on a subcategorie there is a list of more products.

Is it possible to make something like this with CTL Module Maker?
Last edited by Brandt on Wed Mar 10, 2010 2:05 pm, edited 1 time in total.
klenkes
Power Poster
Power Poster
Posts: 307
Joined: Mon Sep 08, 2008 9:43 am

Re: CTL Module Maker creates blank modules?

Post by klenkes »

Well, first, great that it works now.

Do you have more than 1 entry in categorie and subcategorie?
Because if not the module automaticaly shows the products.
Check in the module admin SETTINGS tab: Should the forcelist parameter be enabled by default? CHECK IT

Then it should work, because it works fine on my test installation.

Bernd
klenkes
Power Poster
Power Poster
Posts: 307
Joined: Mon Sep 08, 2008 9:43 am

Re: CTL Module Maker creates blank modules?

Post by klenkes »

Okay...

First:
Make Template called list_products
Put this in:

Code: Select all

<ul>
{foreach from=$itemlist item="item"}
<li {if $item->is_selected}class="active"{/if}>{$item->detaillink}</li>
{/foreach}
</ul>
Second:
Call your module on a page like this:
{cms_module module="fortorangecatalogus" what="categorie"}
Your main categories are listet!

Third:
Modify your list_default like this:

Code: Select all

<h2>{$leveltitle}</h2>
{if $itemcount > 0}

<ul>
{foreach from=$itemlist item="item"}
<li {if $item->is_selected}class="active"{/if}>{$item->detaillink}
{* Call the products of current subcategory *}
{cms_module module="fortorangecatalogus" what="product" parent=$item->alias listtemplate="list_products"}
</li>
{/foreach}
</ul>

{/if}
And you get your subcategories shown with their products beneath them.
Limit their numbers and you are done.

Of course you have to edit those templates of mine because they are bare templates whithout any nice stuff.
But then again... it's your job! It's your website  ;)
Last edited by klenkes on Wed Mar 10, 2010 3:10 pm, edited 1 time in total.
Brandt
Forum Members
Forum Members
Posts: 55
Joined: Fri Mar 05, 2010 10:04 am

Re: CTL Module Maker creates blank modules?

Post by Brandt »

Ah it does, thanks again.

Is it possible though to have products in the main categorie AND in de subcategorie?

Thanks in advance!
klenkes
Power Poster
Power Poster
Posts: 307
Joined: Mon Sep 08, 2008 9:43 am

Re: CTL Module Maker creates blank modules?

Post by klenkes »

Well it works the same way.
You loop through CATEGORIE and after each list item you call the module with another template with item->alias of CATEGORIE.
In this template you loop through SUBCATEGORIE like in my example.
And so on...

You can always call your module in your template again and again, but you have to keep track of what you are doing and calling.
It always depends on your module call with: what= and parent= listtemplate=

That's all.
Brandt
Forum Members
Forum Members
Posts: 55
Joined: Fri Mar 05, 2010 10:04 am

Re: CTL Module Maker creates blank modules?

Post by Brandt »

I was thinking about this, the only thing is that in the end it is not me who is going to put products but someone with no knowledge concerning this.

The thing I was thinking of is that when you are in 'Product' you can choose a subcategorie. I would like to have the option to choose both sub and maincategories. And then it puts the product in the categorie you choose.

Am I pushing the limits?
Post Reply

Return to “Modules/Add-Ons”