Wanted to get some ideas on how to implement a different style of homepage depending on the type of member that logs in.
For example, I have 2 types of users, lets call them Manager and User. When either of these types of user logs in, they effectively get redirected to the same homepage (e.g. www.domain.com/home.aspx) but the content will be different - more specically I have a tab on the homepage that uses DAMP to display different hotspot images and sort order.
What would be the best approach to display the different content to the logged in user? I want to avoid creating multiple home pages as the number of user types will grow.
Currently using the standard Umbraco membership provider as a proof of concept but then migrating to a custom provider after that.
That's an interesting solution. However, the number of member types can grow and I want to try and avoind creating multiple templates, i.e. trying to take out as much time as I can during setup of a new member type. I want to try and leave the setup as much as possible with content writer. What I'm trying to show is a set of promotion boxes on the homepage for different members so the layout is the same, just that the type of promotion and order would be different.
One thing I was thinking of was something like this:
* The "Promo (x)" are effectively content stubs for the homepage and restricted by public access. The content editor can determine which type of promotion will be shown to the member.
I guess my question is, would something like this be ideal? Is it possible to pull in a content stub (Promo (x)) into the homepage and it pull in the correct one according to the member type?
I started using the tag approach but spec changed and used public access permissions instead. I used the same structure as mentioned in my post above and used razor to determine which promotion should show
@using DigibizAdvancedMediaPicker
@using umbraco.MacroEngines
@inherits umbraco.MacroEngines.DynamicNodeContext
@{
var promoBlocks = @Model.AncestorOrSelf(1).DescendantsOrSelf("HomepagePromoBlock");
foreach (var promo in promoBlocks)
{
if (promo.HasAccess())
{
if (promo.hotspots != null)
{
var mediaIds = promo.hotspots.Split(',');
foreach (string mId in mediaIds)
{
dynamic mediaItem = new DynamicMedia(Int32.Parse(mId));
dynamic hotspotImage = new DynamicMedia(Int32.Parse(@mediaItem.hotspotImage));
<a href="#" title="Hyperlink"><img src="@hotspotImage.umbracoFile" alt="image" /></a>
}
}
return;
}
}
}
Different homepage layout for members
Hi,
Wanted to get some ideas on how to implement a different style of homepage depending on the type of member that logs in.
For example, I have 2 types of users, lets call them Manager and User. When either of these types of user logs in, they effectively get redirected to the same homepage (e.g. www.domain.com/home.aspx) but the content will be different - more specically I have a tab on the homepage that uses DAMP to display different hotspot images and sort order.
What would be the best approach to display the different content to the logged in user? I want to avoid creating multiple home pages as the number of user types will grow.
Currently using the standard Umbraco membership provider as a proof of concept but then migrating to a custom provider after that.
Using Umbraco 4.8.1.
Any help much appreciated!
Bij.
What about having templates aassigned to member types with specific content for each eg
userTemplate
managerTemplate
then append to the URL "?alttemplate=userTemplate" this should load that specific template (well know it use too)
In the membership you could assign a template to the member with a custom datatype.
Hope that helps.
Tom
That's an interesting solution. However, the number of member types can grow and I want to try and avoind creating multiple templates, i.e. trying to take out as much time as I can during setup of a new member type. I want to try and leave the setup as much as possible with content writer. What I'm trying to show is a set of promotion boxes on the homepage for different members so the layout is the same, just that the type of promotion and order would be different.
One thing I was thinking of was something like this:
Homepage
-- Homepage Promos
---- *Promo 1
---- *Promo 2
---- *Promo 3
* The "Promo (x)" are effectively content stubs for the homepage and restricted by public access. The content editor can determine which type of promotion will be shown to the member.
I guess my question is, would something like this be ideal? Is it possible to pull in a content stub (Promo (x)) into the homepage and it pull in the correct one according to the member type?
Cheers,
Bij
What about about assigning tags using the tags manager to the promos which correspond to the membertype.
eg member = Manager, tag = Manager
That way the only thing you need to update is the tags assigned to the promo and call all the promos with the tag Manager
Tom
Not a bad idea, I'll have a look into this one.
Is there a good package to handle with tags? Or use just a textstring property (or similar) to manage?
there is allready tags datatype built into umbraco
else this is a good package i've used before http://our.umbraco.org/projects/backoffice-extensions/sniper-systems-tags-control
I started using the tag approach but spec changed and used public access permissions instead. I used the same structure as mentioned in my post above and used razor to determine which promotion should show
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.