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 7 of 7

Thread: Working with Topics

  1. #1
    Kristi is offline Junior Member
    Join Date
    Oct 2009
    Posts
    9

    Default Working with Topics

    I feel like I'm overlooking the obvious here, so I apologize in advance!

    I'm working on learning how new and custom topics work.

    The listing here in the manual says that once created, you can access the topic with something like:

    At a direct URL, with the format: http://www.yoursite.com/t-topicname.aspx
    Embedding in a .aspx page in this format: <aspdnsf:Topic ID="IDName" runat="server" TopicName="TopicName" />
    In a skin template.ascx file, in this format: (!Topic Name="topicname"!)

    So, I created the topic, 'rebuilt' my application (ie, touched the config file), and tested the first option (doing nothing else) and it did not locate a page with the topic name (the first option).

    So, to test out the other two options:

    I'm guessing i need to create an actual .aspx file for it to call the content within my template.aspx?

    Just trying to understand what else needs to be done to display the information. I wanted these topics to simply use the template.aspx file and plop the content within the assigned area in that file.

    That said, do I create an aspx file in the 'web' folder area of the site? What's next?

    Thanks for the help! Again, this feels simple in comparison to some of the other things I've worked out, but that's how it usually works.

  2. #2
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    http://www.yoursite.com/t-topicname.aspx should work fine, just make sure there aren't any spaces in the topic name. We've got these all over our site as examples:

    http://www.yoursite.com/t-topicname.aspx
    http://www.yoursite.com/t-features.aspx

    etc

  3. #3
    Kristi is offline Junior Member
    Join Date
    Oct 2009
    Posts
    9

    Default

    I'm sorry, but it does not seem to work as you describe. I can not call a topic as a page by typing

    http://examplewebsitebla.com/t-topicname.aspx

    I used an existing topic already created by ASPDNSF, as well as trying to create my own topic, and I can not call them in this way. I get the following error:


    HTML Code:
    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
    
    Compiler Error Message: CS1061: 'ASP.topiccontrol_ascx' does not contain a definition for 'TopicName' and no extension method 'TopicName' accepting a first argument of type 'ASP.topiccontrol_ascx' could be found (are you missing a using directive or an assembly reference?)
    
    Source Error:
    
    Line 26:         {
    Line 27:             // set the Customer context, and set the SkinBase context, so meta tags will be set if they are not blank in the Topic results
    Line 28:             if (Topic1.TopicName.Length == 0)
    Line 29:             {
    Line 30:                 String PN = CommonLogic.QueryStringCanBeDangerousContent("TopicName");

    Can you advise as to what needs to happen?

  4. #4
    Mike The Last Boyscout is offline User
    Join Date
    Nov 2008
    Posts
    254

    Default

    I know it sounds kind of stupid, but I just want to make sure: You are replacing 'topicname' with the name of the topic, as defined in the topic editor, correct?

    For instance, if I had a topic for FAQ, it would be www.mywebsite.com/t-faq.aspx.

    Or if I created a topic called Return Policy, it would be www.mywebsite.com/t-return-policy.aspx (with a hyphen instead of a space).

    Again, just making sure!

  5. #5
    Kristi is offline Junior Member
    Join Date
    Oct 2009
    Posts
    9

    Default

    No problem.

    To help clarify, I've attached screenshots to help.

    1. locating a topic in the admin area Manage Topics.

    In this example, i selected an existing topic, just to be sure. This one was the "about" topic.



    2. Taking the Topic Name as the assumed page name, I then refer to it as such:


    (the "/t-about" is placed at the end of my test link, just where "default.aspx" or a product page would go. It's just a very long-winded test link. )

    This is what seems to be what is correct, however this does not work. it does not invoke anything but the error I outlined above.

    So far just to keep it simple I've used only one-name topics to get all the spaces and hyphens out of the equation.

    Thanks!
    Attached Images Attached Images   

  6. #6
    Mike The Last Boyscout is offline User
    Join Date
    Nov 2008
    Posts
    254

    Default

    What version of the software are you using? Also, have you done any customization at all? You may have to submit a ticket to support to have them take a look at this.

  7. #7
    Kristi is offline Junior Member
    Join Date
    Oct 2009
    Posts
    9

    Default

    I'm on 8.0 ML, and no customization aside from screwing around with div and table tags inside the XML.config packages.

    I'm glad I asked now, thank you!