Page 1 of 1

relatives-Module modified for custom templates

Posted: Mon Jun 30, 2008 3:04 pm
by hematec
Hi,

i've modified the relatives module to better fit my needs.
Made some changes to the relatives Module. (also usable in the MLE fork)
!! Backup your old Files !!

- added: call relatives module by writing {relatives} into a template
- added: assign userdefined template for frontend-output i.e. {relatives template='MyTemplate.tpl'}
- added: assign output to var - i.e. {relatives assign='MyRelativesTplVar'} {$MyRelativesTplVar}

Vars for Use in your template:
{RelativesMenu} - string
{RelativesComunicationcenter}-string
Haeding
{RelativesHeading} - string

related Content
{RelativesContent} - array
{RelativesContent[arrID].name} - Menuentry of content
{RelativesContent[arrID].url} - URL to content

related Files
{RelativesFiles} - array
{RelativesFiles[arrID].name} - name of file as given in the admin section
{RelativesFiles[arrID].url} - file url
{RelativesFiles[arrID].target} - target to open file
{RelativesFiles[arrID].description} - description of file as given in the admin section
{RelativesFiles[arrID].extension} - fileextension (i.e. to show related icons)

related Images
{RelativesImages} - array
{RelativesImages[arrID].name} - name of image (given in the admin section)
{RelativesImages[arrID].url} - url of image
{RelativesImages[arrID].target} - target given in the admin section
{RelativesImages[arrID].description} - description of image (given in the admin section)
the default template is hardcoded in the action.default.php:



{* Heading *}
{$RelativesHeading}

{* Files *}

{section name=numloop loop=$RelativesFiles}
{$RelativesFiles[numloop].name}{$RelativesFiles[numloop].description}
{/section}



{* Content *}

{section name=numloop loop=$RelativesContent}
{$RelativesContent[numloop].name}
{/section}


{* Images *}

{section name=numloop loop=$RelativesImages}

{/section}

Download the files - rename to .mpg to .zip - read the changelog.txt - copy files to your relatives folder

@Krisztian Kishazi
Thanks for your great module.
if it minds you, i'll remove the files from this post!!

cheers,
hematec