[SOLVED] UDT, news and extra field for album

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
ankel
Forum Members
Forum Members
Posts: 16
Joined: Tue Mar 28, 2006 10:33 am

[SOLVED] UDT, news and extra field for album

Post by ankel »

UDT, news andy extra field for album


Hello,

I want to make something like that:

I want to add filed like "album_number" where I want to place album number to this news.
Hello,

In my news template I insert:

Code: Select all

{if isset($entry->album_number)}

	{show_me_the_album number="$entry->album_number"}

{/if}
And it's not working :(
Last edited by ankel on Fri Oct 02, 2009 7:37 pm, edited 1 time in total.
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: UDT, news and extra field for album

Post by Russ »

Not sure what you are after here, but to display a specific photo Album you would use

{cms_module module="album" albums="1"}

Where '1' is the album id created by the album module.

If you want to use a smarty variable you have to capture it and use that instead of the '1'

Hope this helps
ankel
Forum Members
Forum Members
Posts: 16
Joined: Tue Mar 28, 2006 10:33 am

Re: UDT, news and extra field for album

Post by ankel »

No, no :)

1. I added one extra field in News module named "album"
2. I want to put in this field the album number what I want to show
3. I want to generate at the end of news code {cms_module module="album" albums="[number of album I putted in my extra field in News module]"}

uff... :)

Hope you understand me now :)
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: UDT, news and extra field for album

Post by Russ »

Well as long as the variable you have is a number and the Album exists you should be fine? As I said, I think you would still need to capture your News (album id) variable in Smarty for use in the Album tag?
ankel
Forum Members
Forum Members
Posts: 16
Joined: Tue Mar 28, 2006 10:33 am

Re: UDT, news and extra field for album

Post by ankel »

Exactly,

I need capture album id from extra field in news module, compile smarty tag with parameter (with UDT) and show this all at the end of the article.
Peciura

Re: UDT, news and extra field for album

Post by Peciura »

If you have created new field definition "album_number" of type "Text Input" insert

Code: Select all

{if !empty($entry->album_number)}
{cms_module module="album" albums=$entry->album_number}
{/if}
to news detail template
ankel
Forum Members
Forum Members
Posts: 16
Joined: Tue Mar 28, 2006 10:33 am

Re: UDT, news and extra field for album

Post by ankel »

hmm...

I swear, that I tested it, and it didn't work. Now I is feeling silly. Thanks very much ! :)

Greetings from Poland! :)
Post Reply

Return to “Modules/Add-Ons”