 |

pfhowe
User
Nov 11, 2006, 6:30 AM
Post #1 of 5
(1349 views)
Shortcut
|
Hi Guys, first of all congratulations on AM2. I wish to add content (an intro to the site) to globalIndex above the article list but I do not want the content to show when the "next" link is clicked (where the intro is not required). How do I do this? I am familair with the templates but not sure how to implement code that will facilitate the above.
(This post was edited by pfhowe on Nov 11, 2006, 6:32 AM)
|
|
|  |
 |

ross
Staff
/ Moderator

Nov 12, 2006, 11:03 AM
Post #2 of 5
(1322 views)
Shortcut
|
Hi there. Thanks for posting! You'll definitely be able to get this happening. All it will take is one little templaetIf on your globalIndex.html template. Here's what you’ll want to add the following to your template where the message should appear:
<!-- templateIf : $articleList.thisPageNumber$ == "1" --> This is the frontpage message <!-- /templateIf --> That's basically checking to see if you are on the first page of results for the category. Nice and simple eh? TemplateIf's are great little tools. Easy to use, yet really powerful. Give this a shot and let me know what you think . ----------------------------------------------------------- Cheers, Ross Fairbairn - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
(This post was edited by ross on Nov 12, 2006, 11:31 AM)
|
|
|  |
 |

pfhowe
User
Nov 12, 2006, 11:10 AM
Post #3 of 5
(1309 views)
Shortcut
|
Hi Ross Perfect - should've known it would be something as simple as that! Great job!
|
|
|  |
 |

mackeymedia
User
Nov 16, 2006, 7:21 PM
Post #4 of 5
(1264 views)
Shortcut
|
I tried this script and it added the inserted text at the top of each category on the global index page! How do you get it only at the top ?
|
|
|  |
 |

Theo
Project Manager
/ Moderator

Nov 16, 2006, 11:14 PM
Post #5 of 5
(1256 views)
Shortcut
|
pfhowe wrote: Perfect - should've known it would be something as simple as that! Great job! You could even go into Admin > My Placeholders and add a new placeholder that you could put in the middle of that message - then later you can update that message without uploading changes to the template! :)
mackeymedia wrote: I tried this script and it added the inserted text at the top of each category on the global index page! How do you get it only at the top ? Hm, I'm not sure what's causing that, it's either in the wrong template or the wrong part of the template (for example, if it's above the categories in the category menu, then you added the code to the categoryMenus/categoryMenu.html template). 1) Make sure you're modifying the articleLists/globalIndex.html template. 2) The code should go in the part of the page you want it to appear in. If you put the code inside the section marked as templateCell : articleRow, it will actually appear once for each article! I hope this helps you track down the problem. If not, just post a link to the page that this is happening on, and we should be able to figure out what's going on. :) Good luck, we'll talk to you soon! Don't hesistate to ask if you have any other questions. Theo Wiersma Project Manager
|
|
|  |
 | |  |
|