Can someone give me a hint here on creating a Glossary Content. What am planning on doing is having a folder under my Content Section under which i will have a list of nodes from A-Z.
Each content (a-z) will have a there RTE, from there the default page will display the main content A, then from the navigation (A-Z) if either B is clicked only the content of B will be displayed just like you would do with a Query String for paging but here i can figure out how to do this.
So when i click on either one of the links www.mypage.com/questions.aspx?page=A or B
Got it working somehowm, here is how my code looks like if someday someone needs to do something similar and if this can be improved please do so
var newsItems = Model.NodeById(1177); var sortedItems = newsItems.Children.Where("Visible").OrderBy("Name, Ascending");
foreach(dynamic p in sortedItems){ var t = @Model.NodeById(p.Id); string select = (@t.Id == @p.Id)? "selected": ""; <div style="float:left; padding:0 3px;"><a href="[email protected]" class="@select">@p.Name</a></div> }
if (!string.IsNullOrEmpty(Request.QueryString["glossary"])){ var query = Request.QueryString["glossary"]; var c = @Model.NodeById(query); <br/><p>@c.glossaryContent</p> } else{ @newsItems.Children.First().glossaryContent }
Just noticed that the my class"Selected" is not properly used here. Instead class will be applied on each items since they all will have the same Id as per
stringselect=(@t.Id==@p.Id)?"selected":"";
Making a Onclick event here wont work either since the page reloads.
Creating a Dynamic Glossary Content
Hi Guys,
Can someone give me a hint here on creating a Glossary Content. What am planning on doing is having a folder under my Content Section under which i will have a list of nodes from A-Z.
Each content (a-z) will have a there RTE, from there the default page will display the main content A, then from the navigation (A-Z) if either B is clicked only the content of B will be displayed just like you would do with a Query String for paging but here i can figure out how to do this.
So when i click on either one of the links
www.mypage.com/questions.aspx?page=A or B
Any Idea?
fuji
Got it working somehowm, here is how my code looks like if someday someone needs to do something similar and if this can be improved please do so
Just noticed that the my class"Selected" is not properly used here. Instead class will be applied on each items since they all will have the same Id as per
Making a Onclick event here wont work either since the page reloads.
Anyone has an idea how i can get this working?
Here is the final code with the active Link set
is working on a reply...