24
Quote:
Per4orm wrote:
For example, the reason that "Comments?" still appears in articles when comments are disabled, is because the phrase is a composite component of <{$story.morelink}>, which means it cannot simply be removed by editing the template.
...
I absolutely agree with the granularity issues... and that provides a much more reasonable example for my previous thought (of having what variables are available and their meaning): Backward compatability. I *just* went through this with XoopsGallery. I made a big mistake by
not leaving in the old smarty variables when I made the templates more granular. XG used to render half the page with one smarty variable, but now I have that broken out quite a bit to allow the designer more control.
In this particular case, I can see <{$story.morelink}> being seperated into (this is off the top of my head):
<{$story.morehref}> URL to full story
<{$story.morehreftext}> Text "Read More..." in selected language
<{$story.morebytes}> # bytes remaining
<{$story.morebytestext}> Text "bytes more" in selected language
<{$story.comhref}> Comments form URL
<{$story.comhreftext}> Text "Comments?" in selected language
That is a LOT of variables for one small section of the block, but it gives total freedom to the designer to implement as they see fit. Some of these (the "text" ones) are likely repetitive to other smarty variables that might already be available.
Now, to the point here: If someone was to patch the News module to do this, what happens to the templates with the old <{$story.morelink}>? How does a template designer know that the old morelink is depricated and the 6 others take it's place other than by comparing versions of templates?
Thanks Draven for already looking at adding this!