473,322 Members | 1,718 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

how to create html template to define editable regions

I am creating a totally adminable news system in asp.net (C#, SQL
server). what i want to accomplish is allow multiple news templates
to be read by an admin area.

heres how it works (hopefully): an artist creates a news template
(html file), drops it into a specific directory, now a client can
choose that template and edit a certain number of fields. the artist
has to be able to specify these fields in the template somehow,
example:

....html tags...
news-NewsTitle-text-news
...html tages...
news-NewsDate-text-news
...html...
news-NewsImage1-image-news
...html tags....

now my admin area needs to read this template file and pull out of it
each of these fields to save to a db which describes the news article.

fieldname="News Title", fieldtype="text"
fieldname="News Date", fieldtype="text"
fieldname="News Image 1" fieldtype="image"

then based on that info i'll create an admin area where they can edit
the actual info saved for each of those. what i need some advise on
is how should i instruct the artists to label each of the fields in
the template, and then how should i pull that info off the template.

I'm pretty new to C# and asp.net, but have experience with classic
asp(vbscript). what i think of is useing filesystemobject, write a
function that will read the html templates line by line, looking for
"news-" and somehow extracting everything there before the "-news".
would this be a good situation to learn reg exp's to use here?

Thank You much for any time you are able to spend to give me a bit of
advise!
Jul 19 '05 #1
1 3565
sc******@cableone.net (dSchwartz) wrote in message news:<4a**************************@posting.google. com>...
I'm pretty new to C# and asp.net, but have experience with classic
asp(vbscript). what i think of is useing filesystemobject, write a
function that will read the html templates line by line, looking for
"news-" and somehow extracting everything there before the "-news".
would this be a good situation to learn reg exp's to use here?

Thank You much for any time you are able to spend to give me a bit of
advise!

My first read would be that you would be much better off using XML, so
you can benefit from the .NET support for XML.

Rather than news being between news- and -news you use the XML
convention of <news>....</news>.

This would also make your system more scalable. You have a template
which consumes the XML to create news stories. By using XML rather
than your own codes you can easily convert the system to a webservice,
where you isolate the content contribution in on one site and the
template and publishing on another. In this way you can have the same
content read in to (consumed) by many sites on both .NET and JAVA
Enterprise servers, and you can consume news stories from multiple
services.

Do some research on SOAP and Web Services. It may give you a vastly
more powerful system with little more scaling, and open you site to
inclusion of portlets from the outside world as well as multiple
servers sites.
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: billy | last post by:
I've got a set of subclasses that each derive from a common base class. What I'd like to do is create a global array of the class types (or, class names) that a manager class can walk through in...
3
by: Richard Fritzler | last post by:
I was given the task of designing a complete web based document prep system. In simplest terms (using a msword explanation) create a database of merge fields, and a library of templates. Allow the...
1
by: dSchwartz | last post by:
I am creating a totally adminable news system in asp.net (C#, SQL server). what i want to accomplish is allow multiple news templates to be read by an admin area. heres how it works...
3
by: Hamilton Woods | last post by:
Diehards, I developed a template matrix class back around 1992 using Borland C++ 4.5 (ancestor of C++ Builder) and haven't touched it until a few days ago. I pulled it from the freezer and...
2
by: justplain.kzn | last post by:
Hi, I have a table with dynamic html that contains drop down select lists and readonly text boxes. Dynamic calculations are done on change of a value in one of the drop down select lists. ...
5
by: Sunny | last post by:
Hi, I want to create a library out of a C++ sources. The implementation should be in object files and there will be a header file which the client will #include. I want to use templates to...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
17
by: henry | last post by:
Folks Here's a skeleton, generic HTML page, call it "index.php". You'll see a bit of php code in the middle: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"...
1
by: wizardry | last post by:
I'm having problems with this templete i created and defined editable regions 3 to be exact and saved as templete. then i created a new page from the templete i just created so the links were...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.