User attributes problem

This is a FORK of the CMS Made Simple project and is not oficially supported in any way by the CMS Made Simple development team.
Elli
Forum Members
Forum Members
Posts: 25
Joined: Thu Mar 27, 2008 3:32 pm

User attributes problem

Post by Elli »

I have the CMSMS MLE 1.2.4 and Cataloger 0.7 (used the old mle patch for cataloger, but it was working before after I used the SVN version of the Cataloger.Image.php)

I cant get the user definited attributes don't show in the site. They appear perfectly in the admin but in the site they are no show.

I had to install the whole site all over, first I made the SQL dumb. After clean install and all the mle functions I placed the old content back. So because i had the content ready I had to make new user attributes with the same name, but I think somewhere the id:s going wrong or something that refers that the current attribute is the same one. The item attributes can be found in admin area site listing and appears to be ok. But even when I try to add new attrobutes they don't appear in the actual site.

Heres my item template, don't find anything wrong about it:



Lataa EsiteLataa Ohjekirja
{$notes}

{$lyhennelma}

{literal}

function repl(img)
  {
  document.item_image.src=img;
  }

{/literal}


The {$lataaesite}, {$lataaohje}, {$lyhennelma} attributes are the ones that don't show.


If anyone have any ideas...?

Oh if I use the
{section name=at loop=$attrlist}
{$attrlist[at].name}: {eval var=$attrlist[at].key}
{/section}

Then the atributes are found. But where is the bug and how do I use the {eval var... thing to call the pdf-file name attributes in the template {$lataaesite} and {$lataaohje}? Or how to call just a cartain attribute with this code?


I know Alby is coming up with the newest mle for cataloger (hopefully soon), but if this is not about the mle patch someone might find a solution, Thanks!
Last edited by Elli on Thu Apr 03, 2008 8:08 am, edited 1 time in total.
alby

Re: User attributes problem

Post by alby »

Elli wrote: I have the CMSMS MLE 1.2.4 and Cataloger 0.7 (used the old mle patch for cataloger, but it was working before after I used the SVN version of the Cataloger.Image.php)
Try with new patch vs Cataloger 0.7 and report this.

I do not know yet whether to change the patch to make it more similar to CMSMS 2.0 (in this case break old patch)

Alby
Elli
Forum Members
Forum Members
Posts: 25
Joined: Thu Mar 27, 2008 3:32 pm

Re: User attributes problem

Post by Elli »

Thanks alot for the patch!

I unistalled the Cataloger and removed it, installed again and replaced the mle files. Images where missing again, got the svn version of the Cataloger.Image.php from the trunk and now it works.

Got the user attributes to work in the item section, but not in the random block on the frontpage.
alby

Re: User attributes problem

Post by alby »

Elli wrote: Got the user attributes to work in the item section, but not in the random block on the frontpage.
Never used the random parameter (and recent)  :)

Here there are missing patches ...

Alby
Attachments

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

Elli
Forum Members
Forum Members
Posts: 25
Joined: Thu Mar 27, 2008 3:32 pm

Re: User attributes problem

Post by Elli »

Ok. The sites are up and running with the new cataloger patch.

But if someone could find the resolution to the random parameter how to get it to show the item user attribute?

Secondly is there a way to get an item user attribute to show in the category view? I found some instructions for the older cataloger versions but there is no sutch line in the new cataloger 0.7 where to put the code...

Thakyou Alby for all your help.
alby

Re: User attributes problem

Post by alby »

Elli wrote: But if someone could find the resolution to the random parameter how to get it to show the item user attribute?
From Help:
{cms_module module='Cataloger' action='random' sub_template='my_sub_template'}

create a new template and put this code:
{get_template_vars}

This display all smarty variables that you can use [if you have a Array or Object for a variable, add this code: {$variable|print_r}]

Alby
Elli
Forum Members
Forum Members
Posts: 25
Joined: Thu Mar 27, 2008 3:32 pm

Re: User attributes problem

Post by Elli »

I have this in the Global content blocks:

{cms_module module='Cataloger' action='random' sub_template='mainos' count='1' alias='/'}


And it shows the title and the image thumb, but not the user attribute from the item. It works in the item view with the {$lyhennelma} (means summary) so should it not be the same in the random template (seen in the first post of this thread)?

Well I give it a try.


Another problem...

If I have a string in the cataloger template how do I use the `$mle_translation.lang_string` function in the cataloger template?
Here is what I'm trying to do (which makes the whole site to crash...)

Lataa Esite --> {$mle_translation.lang_string}
alby

Re: User attributes problem

Post by alby »

Elli wrote: If I have a string in the cataloger template how do I use the `$mle_translation.lang_string` function in the cataloger template?
Here is what I'm trying to do (which makes the whole site to crash...)

Lataa Esite --> {$mle_translation.lang_string}
Why your site crash? It's correct.
Try to comment: {* $mle_translation.lang_string *}TEST

Alby
Elli
Forum Members
Forum Members
Posts: 25
Joined: Thu Mar 27, 2008 3:32 pm

Re: User attributes problem

Post by Elli »

Oh, now it works, didn't have the guts to try after I managed to crash the site before. When saving all I got was blank page both site and admin... probably there was a bigger error somewhere else at the same time.

Well, now everything else is working, i'll try to get the user attribute to work next...

Thanks again!
Elli
Forum Members
Forum Members
Posts: 25
Joined: Thu Mar 27, 2008 3:32 pm

Re: User attributes problem

Post by Elli »

I really don't get it, why the user attributes won't show in the random parameter? Any of the old ones or if I try to add some for testing... They do show in item page if I put them there...

Does anyone have a solution for the item attributer to show in the category view? Maybe this works in the random thingy also...
alby

Re: User attributes problem

Post by alby »

Elli wrote: I really don't get it, why the user attributes won't show in the random parameter? Any of the old ones or if I try to add some for testing... They do show in item page if I put them there...

Does anyone have a solution for the item attributer to show in the category view? Maybe this works in the random thingy also...
Have you overwrite with Cataloger2 attach (reply #3)?
And you have item result for {get_template_vars} in your template (reply #5)?

Alby
Elli
Forum Members
Forum Members
Posts: 25
Joined: Thu Mar 27, 2008 3:32 pm

Re: User attributes problem

Post by Elli »

Yes, the files have been replaced and here is a test page where I put the {get_template_vars} but I dont understand any of it... ;) 

http://gsss.gsgroup.fi/gsss/index.php?p ... t&hl=en_US

The template is like this:

Code: Select all

<div class="catalog_item">
{section name=numloop loop=$items}
<div>
<a href="{$items[numloop].link}"><img src="{$items[numloop].image}" alt="{$items[numloop].title}" align="right"/></a></div>
  <div>
<h3>{$items[numloop].title}</h3>

<p>{$items[numloop].lyhennelma}</p><br />
<a href="{$items[numloop].link}"><img width="150" height="45" src="uploads/images/spacer.gif" alt="" /></a>


{get_template_vars}

</div>

{/section}

</div>

and this {cms_module module='Cataloger' action='random' sub_template='my_sub_template'} don't work it have to be like this: {cms_module module='Cataloger' action='random' sub_template='my_sub_template' count='1' alias='/'}
Last edited by Elli on Mon Apr 07, 2008 5:33 pm, edited 1 time in total.
alby

Re: User attributes problem

Post by alby »

Elli wrote: Yes, the files have been replaced and here is a test page where I put the {get_template_vars} but I dont understand any of it... ;)
{get_template_vars} display any variables know to smarty.
Use a very simple template page:

Code: Select all

<__html>
<head></head>
</__body>
{cms_module module='Cataloger' action='random' sub_template='testi' count='1' alias='/'}
<__body>
</__html>
and in template testi:

Code: Select all

{get_template_vars}
In this way you view all your variables

Alby
Elli
Forum Members
Forum Members
Posts: 25
Joined: Thu Mar 27, 2008 3:32 pm

Re: User attributes problem

Post by Elli »

Ok so what can I see from this http://gsss.gsgroup.fi/gsss/index.php?p ... t&hl=en_US
How does it help me to find the user variables?
alby

Re: User attributes problem

Post by alby »

Elli wrote: Ok so what can I see from this http://gsss.gsgroup.fi/gsss/index.php?p ... t&hl=en_US
How does it help me to find the user variables?
What are your user variables?
There is a array items.

Add in template testi:
{items|print_r}
for view all terms

Alby
Locked

Return to “[locked] CMSMS MLE fork”