#
dagda1
Hi all,
I have what I am sure is a common problem to do with extending the articles module or indeed the articles module itself. We have extended the articles module to include an image picker for the site we are developing.
The problem is that the article module (or our extended module) will be used in several parts of the site to generate a list of articles. The problem is the Html is different for each list. I was wondering how others have dealt with this problem or anybody has a better idea than mine.
What I mean is that in the articles.ascx file there is a place holder that contains the repeater that contains the html that is repeated for each article. We need this HTML to be different in several different places.
My thoughts and I hate each of the following 2 choices are:
1. Create a different module for each differing HTML. Maybe not as bad as it first sounds as the users will know which one to pick depending on which circumstance. I will just extend the articles module each time.
2. I insert a record cuyahoga_modulesetting table that is of an enum type allowing the user to select a type of HTML they generate. I then create different placeholders that contain different repeaters for each differing HTML content. I make the correct placeholder visible and bind to the correct repeater dependant on the modulesetting.
There just has to be a better solution to this. I really hate both of the above but am probably favouring point 2 as deadlines are as ever looming.
Thanks
Paul
I have what I am sure is a common problem to do with extending the articles module or indeed the articles module itself. We have extended the articles module to include an image picker for the site we are developing.
The problem is that the article module (or our extended module) will be used in several parts of the site to generate a list of articles. The problem is the Html is different for each list. I was wondering how others have dealt with this problem or anybody has a better idea than mine.
What I mean is that in the articles.ascx file there is a place holder that contains the repeater that contains the html that is repeated for each article. We need this HTML to be different in several different places.
My thoughts and I hate each of the following 2 choices are:
1. Create a different module for each differing HTML. Maybe not as bad as it first sounds as the users will know which one to pick depending on which circumstance. I will just extend the articles module each time.
2. I insert a record cuyahoga_modulesetting table that is of an enum type allowing the user to select a type of HTML they generate. I then create different placeholders that contain different repeaters for each differing HTML content. I make the correct placeholder visible and bind to the correct repeater dependant on the modulesetting.
There just has to be a better solution to this. I really hate both of the above but am probably favouring point 2 as deadlines are as ever looming.
Thanks
Paul