1
patagon
happy linux weblinks module help - template info
  • 2005/7/1 21:29

  • patagon

  • Quite a regular

  • Posts: 235

  • Since: 2002/1/8 0


Hi,

I am trying to customize the weblinks module (by happy linux) and got stuck here:

There is a template that controls how a link looks (weblinks_link.html), I want to modify this template so that if its on the singleclick page of the module it displays all the content, but if it is on the category view it displays only the name of the link. The problem is that on the templates on both the category and singleclick template the link is called as:

<{include file="db:weblinks_link.html" link=$links[i]}>

so this always calls all the info. I can modify the weblinks_link template but then I get only the name of the link when viewing categories (as expected) but also on the singleclick page (where I want the full info). Is there any way of making an if on the weblinks_link.html template so that it knows if this is a category view or a singleclick page? if the later display all the info?

This may be something simple that I'm overlooking, I am not a programmer. Thanks for reading and any hint on how to do this

2
dickinsd
Re: happy linux weblinks module help - template info
  • 2005/7/9 16:57

  • dickinsd

  • Quite a regular

  • Posts: 278

  • Since: 2004/11/14


^bump^

I would like an answer to this as well if anyones got any tips to share.

Dave

3
patagon
Re: happy linux weblinks module help - template info
  • 2005/7/10 17:30

  • patagon

  • Quite a regular

  • Posts: 235

  • Since: 2002/1/8 0


dickinsd,

I think I found a solution to this. I use another template. I dont have it hand now but its something like this: In the singleclick template I use this:

<{include file="db:weblinks_link.html" link=$links[i]}>

(as it was, no change)

but in the category view I modified this line to call another template instead of weblinks_link. in my case this is one of the rss templates (that I dont use/dont know what they do, I guess any other template can do). then in that template I copy the weblinks template content (in template editor) but take out the part I dont want to display. So far it works, but I'm sure there are better ways to do this....

4
patagon
Re: happy linux weblinks module help - template info
  • 2005/7/11 4:08

  • patagon

  • Quite a regular

  • Posts: 235

  • Since: 2002/1/8 0


Does anyone know if this module can be cloned? I see on xoops_version.php a line that says:

// enable to install this module two or more.
// --- change dir name ---
$MODULE_DIRNAME = 'weblinks';

Am I right in assuming that changing this value to 'somename' will allow me to install this module more than once? if so this is the only file I need to change? (I looked for this comment and see it on several files, but I'm not sure what to do about it). below is an example of this same comment on another file (singleclick.php, it appears like this on many more files):

// enable to install this module two or more.
$xoopsOption['template_main'] = $MODULE_DIRNAME."_singlelink.html";

The way I understand it its telling which template to use, I would like to have one set of templates for my (original) 'weblinks' module and another set for the 'somename' clone...

Thanks

Login

Who's Online

134 user(s) are online (101 user(s) are browsing Support Forums)


Members: 0


Guests: 134


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits