Hello again-
I'm working on the theme for my new second store and want to also style my articles pages differently than my first store.
/ArticleRead/List.cshtml
/ArticleRead/ArticlePost.cshtml
Is there a "StoreID" variable available on these pages that I can look for and set to use a different stylesheet?
For example:
if (StoreID==1)
{
Html.AddCssFileParts("~/Plugins/FoxNetSoft.Articles/Styles/store1-styles.css");
}
else
{
Html.AddCssFileParts("~/Plugins/FoxNetSoft.Articles/Styles/store2-styles.css");
}
Thank you again!
I feel stupid for not noticing that...I made the correction, and now it is working perfectly!
Thank you for the information and link about how to check if a string exists in a list. A very useful tool.
Then FOXNETSOFT said:
1. ShortBody has html decoded text. ex.
Body
<p><img src="/Content/Images/uploaded/Anatomy/Spacial_Orientation/dp_foot_mod_labeled.jpg" width="419" height="424" /></p>
ShortBody will be empty.
2. You wrote bad code. Please change it. from
if (s.Length>13) to if (s.Length<12)
if (s.Length<12)
{
thestrbody = strbody;
}
else
{
string sLess = s.Remove(0, 12);
int index = sLess.IndexOf("Summary");
if (index!=-1)
{
thestrbody = (sLess.Substring(index + 8));
}
}
second block, you should think about condition
@thestrbody
@if (s.Length<12) ???????????
{
read this link about your error
http://www.codeproject.com/Questions/163948/Index-and-count-must-refer-to-a-location-within-th
3. About List
ex.
List<string> groups=new List<string>();
groups.Add("test1");
groups.Add("test2");
groups.Add("test3");
...
groups.Add("test100");
//or List<string> groups=new List<string>("test1", "test2",..., "test100");
string groupname="test1";
if (groups.Any(x=>string.Compare(x,groupname,StringComparison.OrdinalIgnoreCase)==0))
http://stackoverflow.com/questions/19676557/checking-if-string-exists-in-list-c-sharp
I wrote the code in notepad (please verify in Visual Studio)
I would like to simply the conditional clause, but I could not find an easier way because the model does not include the article's parent group name. If it did, I could easily change my condition to this:
string group = Model.ArticleParentGroupName;
if (group.Contains("Anatomy"))
The problem is this:
All of our articles which are in the Anatomy parent group have no text in the article description field..only an image reference, so I need for my string manipulation code to be "skipped" for all articles in that parent group because the string.Remove method will have exception if there is no text to manipulate.
I can't understand what is different about 3.4 that makes my working code now fail.
I am open to any suggestions...
Hello again-
Thanks, we are trying!
I just changed my articles styles.css a little bit and the list now looks OK in browsers and phones:
was:
.article-list .article-item .description{padding:0 0 0 10px;margin:0px 0px 0 100px;text-align:left;color:#555;}
.article-list .article-item .description{padding:0 0 0 10px;margin:0px 0px 0 200px;text-align:left;color:#555;}
Hello-
We have been working on making our website fully responsive for all device types.
The Article view looks great on mobile devices, however, the List view needs some work.
See it here, ( http://www.myfootshop.com/articles/List/1 ) and squish your browser down to phone size to get an idea of how it looks on mobile devices. The description ends up being only one word per line...and really needs to wrap around below the photo or something.
Can anybody help me adjust my style to look better for mobile devices?
Thanks!
Steve