Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 4 of 4

Thread: Content based on level Idea - Is it possible

  1. #1
    virtualtap is offline Senior Member
    Join Date
    May 2007
    Posts
    171

    Default Content based on level Idea - Is it possible

    What I would like to do is have topics show up based on the customer level.
    I want the topic link to be the same ie my link to my-topic would be static as t-mytopic.aspx on a menu for example.

    What I was wondering is if I have customer levels such as gold, silver, bronze etc.
    then make topics called gold-mytopic, silver-mytopic, bronze-mytopic etc.

    Is there a way the driver can try to see if a topic exists based on the marriage of the customer level name and the requested topic name and load the topic if it is available and if not just default to the topic name?

    For example if my customer level is gold and I request mytopic the site would load t-gold-mytopic.aspx, if gold-mytopic does not exist it would just load the page t-mytopic.aspx

    I know I can accomplish what I am looking for with a bunch of when statements in an XML package but I would really like to make this dynamic. so it is completely managed from the admin.

    Thanks
    Last edited by virtualtap; 01-10-2011 at 11:00 PM.
    MSX

  2. #2
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    Quote Originally Posted by virtualtap View Post
    I know I can accomplish what I am looking for with a bunch of when statements in an XML package but I would really like to make this dynamic. so it is completely managed from the admin.

    Sounds to me like 'a bunch of when statements in an xmlpackage' IS dynamic?
    What management would be needed once you've set-it up?



    TTFN

    BFG

  3. #3
    virtualtap is offline Senior Member
    Join Date
    May 2007
    Posts
    171

    Default

    The way the XML package works the admin cant create a level and make topics that would work, I would have to add another when statement to the xml package.

    I currently have it working by modifying the driver.cs file. So no matter what customer level admin creates they can also create a topic with the customer level as part of the name and it works, my only issue now is that I need to prevent topics that belong to a a specific customer level from being seen by other levels for example, if someone is a gold level they should not be able to type in silver-mytopic.aspx and see it.

    Thanks
    MSX

  4. #4
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    Modify (or add another) query in xmlpackage to get the current customer level name along with a list of all topic names.


    Then in the package transform :-

    Check to see if there exists a topic called customerlevelname-mytopic, if so then display it.
    Otherwise display mytopic




    Another way to do it would be to have an xmlpackage within an xmlpackage.
    call the inner xmlpackage with the customerlevelname as a parameter, & then in the inner xmlpackage pull a topic called customerlevelname-mytopic.


    Then you can output customerlevelname-mytopic (or the default if there is no customerlevelname-mytopic).



    TTFN

    BFG